我只想在第一个屏幕中隐藏标签栏并显示在其他屏幕中,我该如何实现。 任何帮助不胜感激
const TabNavigator = createBottomTabNavigator({
Home: {
screen: HomeScreen,
navigationOptions: {
tabBarLabel: 'Home',
tabBarIcon: ({ tintColor }) => (
<Icon name="ios-home" color={tintColor} size={24} />
)
}
},
Quotes: {
screen: QuoteScreen,
navigationOptions: {
tabBarLabel: 'Quotes',
tabBarIcon: ({ tintColor }) => (
<Icon name="ios-quote" color={tintColor} size={24} />
)
}
},
About: {
screen: AboutScreen,
navigationOptions: {
tabBarLabel: 'About',
tabBarIcon: ({ tintColor }) => (
<Icon name="ios-person" color={tintColor} size={24} />
)
}
},
Books: {
screen: BoookScreen,
navigationOptions: {
tabBarLabel: 'Books',
tabBarIcon: ({ tintColor }) => (
<Icon name="ios-book" color={tintColor} size={24} />
)
}
},
Videos: {
screen: VideoScreen,
navigationOptions: {
tabBarLabel: 'Videos',
tabBarIcon: ({ tintColor }) => (
<Icon name="ios-videocam" color={tintColor} size={24} />
)
}
}
},
{
tabBarOptions: {
activeTintColor: 'yellow',
inactiveTintColr: 'white',
activeBackgroundColor:'black',
inactiveBackgroundColor:'black'
}
});
export default createAppContainer(TabNavigator);
仅在主屏幕中显示选项卡栏 我尝试隐藏在选项卡栏中选项,但它隐藏了所有屏幕上的选项卡栏,或者选项卡栏在所有屏幕上都可见。我应该尝试什么才能达到预期的结果? 任何帮助将不胜感激。 提前感谢...
将tabBarVisible: false,
添加到主屏幕导航选项