Yes you can wrap your navigator by another component like <View>
and style it. Maybe it has some better solutions but wrapping is just fine and I did it before.
there is a built-in option for that - you need to set mode: 'modal'
to your stack navigator, eg:
const MainStack = initialRouteName =>
StackNavigator(
{
...
},
{
...navStyles,
initialRouteName,
mode: 'modal',
}
);
note this will only have an effect on ios, because such pattern is not present on android
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.