根据版本 6 中的文档,我们可以像这样使用 cardStyleInterpolator
import { CardStyleInterpolators } from '@react-navigation/stack';
// ...
<Stack.Screen
name="Profile"
component={Profile}
options={{
title: 'Profile',
cardStyleInterpolator: CardStyleInterpolators.forFadeFromBottomAndroid,
}}
/>;
这意味着我们还必须安装@react-navigation/stack?因为此代码在反应导航 6 中不起作用。任何帮助将不胜感激。