Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

React Navigation modal showing an erroneous gap

$
0
0

I'm using React Navigation 5x's ModalPresentationIOS preset. All my other screens are working fine, but on this one particular screen, I'm seeing a black gap at the top as shown below. I've tried it on a real device as well as the simulator and I'm seeing the same error in both cases:

enter image description here

const AdminStack = () => {
    return (
        <AdminStack.Navigator
            initialRouteName="First"
            screenOptions={{
                headerShown: false,
                swipeEnabled: true,
                gestureEnabled: true,
                gestureResponseDistance: {
                    horizontal: width,
                    vertical: height,
                },
                cardOverlayEnabled: true,
                ...TransitionPresets.ModalPresentationIOS,
            }}
            mode="modal"
            headerMode="none">
            <AdminStack.Screen name="First" component={FirstScreen} />
            <AdminStack.Screen name="Second" component={SecondScreen} />
            <AdminStack.Screen name="AddGroup" component={AddGroupScreen} />
        </AdminStack.Navigator>
    )
}

Viewing all articles
Browse latest Browse all 16552

Trending Articles