2017-04-12 2 views
5

最近、反応ネイティブプロジェクトを〜0.28から最新のバージョン(0.43.2)にアップグレードしました。何らかの理由でナビゲーションバーが表示されません。私のために長い隠れている。NavigatorIOSコンポーネントのナビゲーションバーを非表示(RNアップデート後)

<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 
     /> 
+0

第2版のコードが私のために働いています(0.43)。 styles.containerには何がありますか? – Ludovic

+0

はい、実際には、コンポーネントを起動して再追加した後に機能します。 –

答えて

2

によって問題を特定しようとした後、ここで

コードは(それがTabBarIOSコンポーネントに座っている)でありますすべてを取り除き、それを最も基本的な形に縮小すると、問題は私が見つけることのできるコードではないことに気付きました。

新しいプロジェクトを最初から初期化してから、すべてのコンポーネントを再追加しても問題ありません。

関連する問題