tabBarVisible无法正常工作,如何隐藏topMaterialNavigator?

时间:2019-04-04 04:44:03

标签: react-native react-navigation

我无法使用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
  }
  })

0 个答案:

没有答案