We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
适配设备安全区域的第三方库react-native-safearea-view
安装依赖
yarn add react-native-safe-area-view
使用
import SafeAreaView from 'react-native-safe-area-view' <SafeAreaView> {//...} </SafeAreaView>
The text was updated successfully, but these errors were encountered:
适配设计稿与实际设备设备像素比的方案
Sorry, something went wrong.
ps:React Navigation already includes and uses this view starting in v1.0.0-beta.16.
补充说明:react-navigation库早在v1.0.0-beta.16版本起就使用了该库。因此通过react-navigation构建路由的应用不需要在专门安装这个库。
而且在TabNavigator组件内的Screen不需要考虑适配IPhoneX的底部,而StackNavigator组件内的Screen还是需要考虑适配iPhone X的底部,因此仍然需要手动引入react-native-safe-area-view库,将SafeAreaView组件作为Screen组件的根组件。
No branches or pull requests
适配设备安全区域的第三方库react-native-safearea-view
安装依赖
使用
The text was updated successfully, but these errors were encountered: