反应导航UI问题

时间:2020-01-22 02:09:25

标签: react-native react-navigation

我有两个屏幕,Scar QR是QR码扫描仪页面,而QR QR成功是成功页面,如果我按标题导航按钮返回,则UI会如屏幕截图中所示中断,这将被导航从设置。我已将gesturesEnabled标志设置为false。我尚未指定默认的Header back功能。

const SettingsNavigator = createStackNavigator(
    {
        SETTINGS_MENU: {
            screen: Settings
        },

        SCAN_QR_SETTINGS: {
            screen: ScanQR,
            navigationOptions: () => ({
                title: I18n.t('SETTINGS.SCAN_QR.HEADING')
            })
        },
        SCAN_QR_SETTINGS_SUCCESS: {
            screen: ScanQRSuccess,
            navigationOptions: () => ({
                title: I18n.t('SETTINGS.SCAN_QR.HEADING')
            })
        }
    },
    {
        initialRouteName: 'SETTINGS_MENU',
        defaultNavigationOptions: {
            gesturesEnabled: false,
            swipeEnabled: false
        }
    }
);

0 个答案:

没有答案