反应导航BottomTabNavigator在生产中被切断

问题描述 投票:0回答:1

我使用的是最新的稳定版本,并且仅在生产中(在所有手机上)。

我添加了空白页面,以确保其不是页面的高度

代码:

const TestStackNavigatorr =  createBottomTabNavigator({
  HOME: {
    screen: Overview,
  }
})
const App = createAppContainer(TestStackNavigatorr)

export default App

开发图片:

development - OK

生产:

production - cut off

react-native react-navigation expo
1个回答
0
投票

我发现了问题。我必须在app.json中删除Statusbar config,然后将此视图放入Constants.StatusBarHeight中。

 return <View style={{flex: 1, backgroundColor: 'red' }}>
          <View style={{height:Constants.statusBarHeight, backgroundColor: "#2F5851"}}/>
          <WrappedComponent />
   </View>
© www.soinside.com 2019 - 2024. All rights reserved.