我无法使用tabBarVisible属性隐藏顶部栏导航器。
我的顶级导航器是:
export default createAppContainer(createSwitchNavigator({
AuthLoading: AuthLoadingScreen,
Main: MainTabNavigator,
Auth: AuthStack
},
{
initialRouteName: 'AuthLoading',
tabBarVisible:false
}
));
MainTabNavigator是这样:
export default createMaterialTopTabNavigator({
bottomNavigator,
Profile: Profile,
tempScreen: TempScreen
}, {
navigationOptions: ({ navigation }) => {
let tabBarVisible = true;
return {
tabBarVisible,
};
},
header:null,
tabBarOptions: {
showLabel: false,
showIcon:false
}
})