我正在尝试使iOS移动应用程序具有本机响应。现在,我在App.js中有一个堆栈导航器
export const Navigation = createAppContainer(
createStackNavigator({
Screen1: { screen: Screen1 },
Screen2: { screen: Screen2 },
Screen3: { screen: Screen3 },
Screen4: { screen: Screen4 },
}),
)
我想在标题的左侧按钮(而不是后退按钮)上有一个屏幕4的抽屉导航器。我尝试按照示例进行操作,但是没有用。
答案 0 :(得分:0)
像这样创建一个Drawer导航器,
const DrawerNavigator = createDrawerNavigator({
Screen4: { screen: Screen4 }
}
然后在您的堆栈导航器中使用此DrawerNavigator,
export const Navigation = createAppContainer(
createStackNavigator({
Screen1: { screen: Screen1 },
Screen2: { screen: Screen2 },
Screen3: { screen: Screen3 },
drawer:DrawerNavigator ,
}),
)