我想在TabNavigator中禁用滑动以更改选项卡。我找到了两种解决方案
1(swipeEnabled: false,
2(navigationOptions: {
gesturesEnabled: false
}
两者都不能在iOS的react native中工作。任何解决方案都会有所帮助。
这适用于"react native":"^0.55.4",并且已经工作了很长一段时间
import { createBottomTabNavigator, createStackNavigator } from "react-navigation";
const MyTabView = createBottomTabNavigator(
{
screen1: { screen: screen1 },
screen2: { screen: screen2 },
},
{
swipeEnabled: false,
}
}