我的导航栏有问题,如果屏幕上的某个元素不可单击,那么当您单击它时,屏幕会打开,就像从下面单击导航栏一样。我在我的容器屏幕上使用了 marginBottom。
return (<Tab.Navigator
tabBarStyle={{position: 'absolute',
bottom: 0,
width: '100%',
backgroundColor: '#F8F7FB',
borderRadius: 30,
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center'}}
screenOptions={{
headerShown: false,
activeTintColor: '#000000',
activeBackgroundColor: '#E2E2E2',
inactiveBackgroundColor: '#ffffff',
labelStyle: {
fontFamily: 'Rubik_400Regular',
fontStyle: "bold",
fontSize: 13,
color: '#181725',
},
}}>
<Tab.Screen
name="ScreenTabMain"
options={{
我尝试 marginBottom 和 useBottomTabBarHeight() 但没有解决。 ios 和 android 都有这个问题
请同时提供屏幕代码,您的选项卡导航器对我来说似乎很好。