From ae56f9b673ce2bdc775afe3cee4bbdc2ea46ebdf Mon Sep 17 00:00:00 2001 From: WoLewicki Date: Wed, 5 Jan 2022 17:08:26 +0100 Subject: [PATCH 1/8] feat: add swipe direction on iOS --- TestsExample/App.js | 3 +- TestsExample/ios/Podfile.lock | 4 +- TestsExample/src/Test1260.tsx | 33 ++++++++++ TestsExample/src/Test556.js | 10 +-- guides/GUIDE_FOR_LIBRARY_AUTHORS.md | 6 ++ ios/RNSScreen.h | 6 ++ ios/RNSScreen.m | 10 +++ ios/RNSScreenStack.m | 76 +++++++++++++++++++--- ios/RNSScreenStackAnimator.m | 32 ++++++--- native-stack/README.md | 6 ++ src/native-stack/types.tsx | 8 +++ src/native-stack/views/NativeStackView.tsx | 2 + src/types.tsx | 9 +++ 13 files changed, 180 insertions(+), 25 deletions(-) create mode 100644 TestsExample/src/Test1260.tsx diff --git a/TestsExample/App.js b/TestsExample/App.js index 01f7695342..1a8050ea54 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 Test1260 from './src/Test1260'; 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/Test1260.tsx b/TestsExample/src/Test1260.tsx new file mode 100644 index 0000000000..e130c84237 --- /dev/null +++ b/TestsExample/src/Test1260.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 ( +