我需要为 Navigation 5.0 中的堆栈导航器中的特定屏幕将导航动画更改为 bottom-to-top
。
最佳答案
我在 StackOverflow 中寻找答案,但没有找到与单屏相关的解决方案。如果有人正在寻找答案,那么这里是解决方案。
options={{cardStyleInterpolator: CardStyleInterpolators.forVerticalIOS}}
import { CardStyleInterpolators,createStackNavigator } from "@react-navigation/stack";
<AppStack.Navigator headerMode="none" initialRouteName={"Home"}>
<AppStack.Screen name="Home" component={HomeScreen} />
<AppStack.Screen
options={{
cardStyleInterpolator: CardStyleInterpolators.forVerticalIOS,
}}
name="Edit"
component={EditScreen}
/>
<AppStack.Screen name="Settings" component={SettingScreen} />
</>
)}
</AppStack.Navigator>
关于react-native - 在 StackNavigator 中更改特定屏幕的动画方向?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68444395/