react-native - 在 StackNavigator 中更改特定屏幕的动画方向?

标签 react-native react-navigation

我需要为 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/

相关文章:

javascript - Json stringify范围错误

react-native - React Native 按顺序呈现 ListView

android - react native 。安卓。推送通知权限

react-native - 错误 : undefined Unable to resolve module `@react-navigation/bottom-tabs`

ios - iPhone 模拟器保持状态栏可见

android - RNFetchBlob android,先查看再下载图片

react-native - StackNavigator 颜色在 'back mode' 时发生变化

javascript - React Native "TypeError: Object(...) is not a function" react 导航堆栈错误

react-navigation - 在标题选项中使用 UIKitten 图标 react 导航 5

reactjs - 导航到另一个页面的后退按钮会导致底部选项卡消失并滑动到错误的方向