How do you hide the tab bar in a full screen modal using react navigation?
如何使用反应导航隐藏全屏模式中的标签栏?
I have a standard tab navigation a standard modal.
我有一个标准的选项卡导航标准模式。
const MapStack = StackNavigator(
{
Map: {
screen: MapScreen,
},
MyModal: {
screen: ModalScreen,
},
},
{
mode: 'modal',
headerMode: 'none',
}
);
export default TabNavigator({
Home: { screen: HomeScreen },
Map: { screen: MapStack },
});
2 个解决方案
#1
0
You can add the props to your screen's navigationOptions
as
您可以将道具添加到屏幕的navigationOptions中
Map: {
screen: MapScreen,
navigationOptions: {
tabBarVisible: false
}
},
#2
0
After you write code follow this step
编写代码后,请按照此步骤操作
navigationOptions: { tabBar: { visible: false } }
I believe it will help you.
我相信它会对你有所帮助。
#1
0
You can add the props to your screen's navigationOptions
as
您可以将道具添加到屏幕的navigationOptions中
Map: {
screen: MapScreen,
navigationOptions: {
tabBarVisible: false
}
},
#2
0
After you write code follow this step
编写代码后,请按照此步骤操作
navigationOptions: { tabBar: { visible: false } }
I believe it will help you.
我相信它会对你有所帮助。