如何将 tabBar 从子堆栈隐藏到父堆栈导航器?

How to hide tabBar from a child stack to parent stack navigator?

我有一个不需要 tabBar 的屏幕 'About',但该屏幕的其他兄弟必须有 tabBar。

名为 'Settings' 的选项卡中的第三个元素有一个默认值 class,我在其中使用了堆栈导航器。

export default class Setting extends Component {
    constructor(props) {
        super(props);
        this.state = {
        }
    }
    static navigationOptions = {
        header: null,
        tabBarVisible:true // if i place false here the tabBar is invisible on all screens in below specified stack.
    };

    render() {

        return (

            <SettingStack />

        );
    }
}


export const SettingStack = StackNavigator({
    // screenname : { screen : ImportedClassname }
    settingsscreen: { screen: SettingsScreen },
    first: { screen: first },
    second: { screen: second },
    about: { screen: About },
    third: { screen: third },
});

如何仅在 'about' 屏幕上隐藏 tabBar。

只需删除默认导出 class 并在您的父导航树中使用该 "settingstack"。它肯定会工作,如果不能请回来...