Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native React Navigation v5中setOptions内的CardStyleInterpolators_React Native_React Navigation - Fatal编程技术网

React native React Navigation v5中setOptions内的CardStyleInterpolators

React native React Navigation v5中setOptions内的CardStyleInterpolators,react-native,react-navigation,React Native,React Navigation,我正试图根据请求的来源更改转换样式。我可以这样做吗 navigation.setOptions({ CardStyleInterpolator: ({ CardStyleInterpolators }) => { if (route.params?.cleanup == 1) { CardStyleInterpolators.forVerticalIOS; } else { CardStyleInterpolators.for

我正试图根据请求的来源更改转换样式。我可以这样做吗

navigation.setOptions({
    CardStyleInterpolator: ({ CardStyleInterpolators }) => {
      if (route.params?.cleanup == 1) {
        CardStyleInterpolators.forVerticalIOS;
      } else {
        CardStyleInterpolators.forHorizontalIOS;
      }
    },
}}