From 941ce5d1621d0fa36876926acad318915cfaaf8d Mon Sep 17 00:00:00 2001 From: WoLewicki Date: Wed, 5 Jan 2022 16:27:21 +0100 Subject: [PATCH 1/8] feat: add transition duration on iOS --- TestsExample/App.js | 3 +- TestsExample/ios/Podfile.lock | 4 +-- TestsExample/src/Test.tsx | 33 ++++++++++++++++++++++ guides/GUIDE_FOR_LIBRARY_AUTHORS.md | 6 ++++ ios/RNSScreen.h | 1 + ios/RNSScreen.m | 1 + ios/RNSScreenStackAnimator.m | 2 +- native-stack/README.md | 6 ++++ src/native-stack/types.tsx | 7 +++++ src/native-stack/views/NativeStackView.tsx | 2 ++ src/types.tsx | 7 +++++ 11 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 TestsExample/src/Test.tsx diff --git a/TestsExample/App.js b/TestsExample/App.js index 01f7695342..e93867ddb6 100644 --- a/TestsExample/App.js +++ b/TestsExample/App.js @@ -73,13 +73,14 @@ import Test1209 from './src/Test1209'; import Test1214 from './src/Test1214'; import Test1227 from './src/Test1227'; import Test1228 from './src/Test1228'; +import Test from './src/Test'; enableFreeze(true); export default function App() { return ( - + ); } diff --git a/TestsExample/ios/Podfile.lock b/TestsExample/ios/Podfile.lock index b827ba79d2..f291f8dac9 100644 --- a/TestsExample/ios/Podfile.lock +++ b/TestsExample/ios/Podfile.lock @@ -376,7 +376,7 @@ PODS: - React-RCTVibration - ReactCommon/turbomodule/core - Yoga - - RNScreens (3.10.0): + - RNScreens (3.10.1): - React-Core - React-RCTImage - RNVectorIcons (7.1.0): @@ -592,7 +592,7 @@ SPEC CHECKSUMS: RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211 RNReanimated: b04ef2a4f0cb61b062bbcf033f84a9e470f4f60b - RNScreens: 03ba504f8c98607ad1f07808e71040e0afa335ec + RNScreens: 522705f2e5c9d27efb17f24aceb2bf8335bc7b8e RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59 Yoga: c11abbf5809216c91fcd62f5571078b83d9b6720 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a diff --git a/TestsExample/src/Test.tsx b/TestsExample/src/Test.tsx new file mode 100644 index 0000000000..85c8350810 --- /dev/null +++ b/TestsExample/src/Test.tsx @@ -0,0 +1,33 @@ +import * as React from 'react'; +import {Button} from 'react-native'; +import {NavigationContainer, ParamListBase} from '@react-navigation/native'; +import {createNativeStackNavigator, NativeStackNavigationProp} from 'react-native-screens/native-stack'; + +const Stack = createNativeStackNavigator(); + +export default function App() { + return ( + + + + + + + ); +} + +function First({navigation}: {navigation: NativeStackNavigationProp}) { + return ( +