I had recently upgraded my react native project from ~0.28 to the most recent version (0.43.2) and for some reason my navigation bar no longer hides for me.
Here is the code (it is sitting in a TabBarIOS component):
<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>
Adding it outside initialRoute
also does not work:
<NavigatorIOS
style={styles.container}
ref="nav"
interactivePopGestureEnabled={false}
initialRoute={{
title: 'Home',
component: HomeNavigationController,
showTabBar: false,
passProps: {...},
}}
navigationBarHidden={true} // does not work
/>
So, after trying to isolate the problem by stripping out everything and reducing it to its most basic form, I realized that it the problem wasn't in any code that I could find.
I initialized a new project from scratch and then re-added all my components and now it works just fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With