const STATUS_BAR_HEIGHT = isIOS() ? (isIPhoneX() ? 34 : 20) : StatusBar.currentHeight;
获取状态栏高度,给导航栏加paddingTop 即可
<Stack.Screen
name="Main"
component={Main}
options={{
cardStyle: { height: '100%', paddingTop: STATUS_BAR_HEIGHT },
headerShown: false,
gestureEnabled: false,
}}
/>