【问题标题】:react-navigation BottomTabNavigator cut off in productionreact-navigation BottomTabNavigator 在生产中被切断
【发布时间】:2020-01-24 10:58:09
【问题描述】:
我使用的是最新的稳定版本,它只发生在生产环境中(在所有手机上)。
我添加了空白页面以确保它不是页面的高度
代码:
const TestStackNavigatorr = createBottomTabNavigator({
HOME: {
screen: Overview,
}
})
const App = createAppContainer(TestStackNavigatorr)
export default App
开发图:
生产:
【问题讨论】:
标签:
react-native
react-navigation
expo
【解决方案1】:
我发现了问题。我不得不删除 app.json 中的 Statusbar 配置,并将这个 View 与 Constants.StatusBarHeight 放在一起。
return <View style={{flex: 1, backgroundColor: 'red' }}>
<View style={{height:Constants.statusBarHeight, backgroundColor: "#2F5851"}}/>
<WrappedComponent />
</View>