Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RN 学习之路 #20

Open
heikaimu opened this issue Apr 1, 2019 · 0 comments
Open

RN 学习之路 #20

heikaimu opened this issue Apr 1, 2019 · 0 comments

Comments

@heikaimu
Copy link
Owner

heikaimu commented Apr 1, 2019

配合navigation设置StatusBar

componentDidMount() {
  this._navListener = this.props.navigation.addListener("didFocus", () => {
    StatusBar.setBarStyle("light-content");
    isAndroid && StatusBar.setBackgroundColor('#6a51ae');
    // StatusBar.setBarStyle('dark-content');
    // isAndroid && StatusBar.setBackgroundColor('#ecf0f1');
  });
}
componentWillUnmount() {
  this._navListener.remove();
}

给View设置border为1的线

import { PixelRatio } from "react-native";
borderWidth: 1 / PixelRatio.get()

上传图片

https://heartbeat.fritz.ai/how-to-upload-images-in-a-react-native-app-4cca03ded855

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant