NavigatorIOS 组件中的隐藏导航栏(react-native)在 ​​RN 更新后不起作用

Hide navigation bar in NavigatorIOS component (react-native) doesn't work after RN update

我最近将我的 React Native 项目从 ~0.28 升级到最新版本 (0.43.2),出于某种原因,我的导航栏不再对我隐藏。

这是代码(它位于 TabBarIOS 组件中):

    <TabBarIOS.Item
      selected={this.state.selectedTab === 'home'}
      title='Home'
      icon={require ('./Icons/IconImages/HomeTabIcon.png')}
      onPress={
        () => this._tabPressed('home')
      }>
      <NavigatorIOS
        style={styles.container}
        ref="nav"
        interactivePopGestureEnabled={false}
        initialRoute={{
          title: 'Home',
          component: HomeNavigationController,
          navigationBarHidden: true, //this does nothing now
          showTabBar: false, //this is to hide the bottom tabBar
          passProps: {
            ...
          },
        }}/>
      </TabBarIOS.Item>

initialRoute外添加也不起作用:

          <NavigatorIOS
        style={styles.container}
        ref="nav"
        interactivePopGestureEnabled={false}
        initialRoute={{
          title: 'Home',
          component: HomeNavigationController,
          showTabBar: false,
          passProps: {...},
        }}
        navigationBarHidden={true} // does not work
        />

因此,在尝试通过剥离所有内容并将其简化为最基本的形式来隔离问题之后,我意识到问题不在我能找到的任何代码中。

我从头开始初始化了一个新项目,然后重新添加了所有组件,现在一切正常。