1
+ diff --git a/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm b/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm
2
+ index abb2cf6..fb81d52 100644
3
+ --- a/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm
4
+ +++ b/node_modules/react-native-screens/ios/RNSScreenStackAnimator.mm
5
+ @@ -5,13 +5,14 @@
6
+
7
+ // proportions to default transition duration
8
+ static const float RNSSlideOpenTransitionDurationProportion = 1;
9
+ - static const float RNSFadeOpenTransitionDurationProportion = 0.2 / 0.35;
10
+ - static const float RNSSlideCloseTransitionDurationProportion = 0.25 / 0.35;
11
+ - static const float RNSFadeCloseTransitionDurationProportion = 0.15 / 0.35;
12
+ - static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.35;
13
+ + static const float RNSFadeOpenTransitionDurationProportion = 0.2 / 0.5;
14
+ + static const float RNSSlideCloseTransitionDurationProportion = 0.25 / 0.5;
15
+ + static const float RNSFadeCloseTransitionDurationProportion = 0.15 / 0.5;
16
+ + static const float RNSFadeCloseDelayTransitionDurationProportion = 0.1 / 0.5;
17
+ // same value is used in other projects using similar approach for transistions
18
+ // and it looks the most similar to the value used by Apple
19
+ static constexpr float RNSShadowViewMaxAlpha = 0.1;
20
+ + static const int UIViewAnimationOptionCurveDefaultTransition = 7 << 16;
21
+
22
+ @implementation RNSScreenStackAnimator {
23
+ UINavigationControllerOperation _operation;
24
+ @@ -22,7 +23,7 @@ - (instancetype)initWithOperation:(UINavigationControllerOperation)operation
25
+ {
26
+ if (self = [super init]) {
27
+ _operation = operation;
28
+ - _transitionDuration = 0.35; // default duration in seconds
29
+ + _transitionDuration = 0.5; // default duration in seconds
30
+ }
31
+ return self;
32
+ }
33
+ @@ -129,6 +130,8 @@ - (void)animateSimplePushWithShadowEnabled:(BOOL)shadowEnabled
34
+ }
35
+
36
+ [UIView animateWithDuration:[self transitionDuration:transitionContext]
37
+ + delay:0
38
+ + options:UIViewAnimationOptionCurveDefaultTransition
39
+ animations:^{
40
+ fromViewController.view.transform = leftTransform;
41
+ toViewController.view.transform = CGAffineTransformIdentity;
42
+ @@ -170,6 +173,8 @@ - (void)animateSimplePushWithShadowEnabled:(BOOL)shadowEnabled
43
+
44
+ if (!transitionContext.isInteractive) {
45
+ [UIView animateWithDuration:[self transitionDuration:transitionContext]
46
+ + delay:0
47
+ + options:UIViewAnimationOptionCurveDefaultTransition
48
+ animations:animationBlock
49
+ completion:completionBlock];
50
+ } else {
51
+ @@ -203,6 +208,8 @@ - (void)animateSlideFromLeftWithTransitionContext:(id<UIViewControllerContextTra
52
+ toViewController.view.transform = rightTransform;
53
+ [[transitionContext containerView] addSubview:toViewController.view];
54
+ [UIView animateWithDuration:[self transitionDuration:transitionContext]
55
+ + delay:0
56
+ + options:UIViewAnimationOptionCurveDefaultTransition
57
+ animations:^{
58
+ fromViewController.view.transform = leftTransform;
59
+ toViewController.view.transform = CGAffineTransformIdentity;
60
+ @@ -228,6 +235,8 @@ - (void)animateSlideFromLeftWithTransitionContext:(id<UIViewControllerContextTra
61
+
62
+ if (!transitionContext.isInteractive) {
63
+ [UIView animateWithDuration:[self transitionDuration:transitionContext]
64
+ + delay:0
65
+ + options:UIViewAnimationOptionCurveDefaultTransition
66
+ animations:animationBlock
67
+ completion:completionBlock];
68
+ } else {
69
+ @@ -251,6 +260,8 @@ - (void)animateFadeWithTransitionContext:(id<UIViewControllerContextTransitionin
70
+ [[transitionContext containerView] addSubview:toViewController.view];
71
+ toViewController.view.alpha = 0.0;
72
+ [UIView animateWithDuration:[self transitionDuration:transitionContext]
73
+ + delay:0
74
+ + options:UIViewAnimationOptionCurveDefaultTransition
75
+ animations:^{
76
+ toViewController.view.alpha = 1.0;
77
+ }
78
+ @@ -262,6 +273,8 @@ - (void)animateFadeWithTransitionContext:(id<UIViewControllerContextTransitionin
79
+ [[transitionContext containerView] insertSubview:toViewController.view belowSubview:fromViewController.view];
80
+
81
+ [UIView animateWithDuration:[self transitionDuration:transitionContext]
82
+ + delay:0
83
+ + options:UIViewAnimationOptionCurveDefaultTransition
84
+ animations:^{
85
+ fromViewController.view.alpha = 0.0;
86
+ }
87
+ @@ -284,6 +297,8 @@ - (void)animateSlideFromBottomWithTransitionContext:(id<UIViewControllerContextT
88
+ toViewController.view.transform = topBottomTransform;
89
+ [[transitionContext containerView] addSubview:toViewController.view];
90
+ [UIView animateWithDuration:[self transitionDuration:transitionContext]
91
+ + delay:0
92
+ + options:UIViewAnimationOptionCurveDefaultTransition
93
+ animations:^{
94
+ fromViewController.view.transform = CGAffineTransformIdentity;
95
+ toViewController.view.transform = CGAffineTransformIdentity;
96
+ @@ -309,6 +324,8 @@ - (void)animateSlideFromBottomWithTransitionContext:(id<UIViewControllerContextT
97
+
98
+ if (!transitionContext.isInteractive) {
99
+ [UIView animateWithDuration:[self transitionDuration:transitionContext]
100
+ + delay:0
101
+ + options:UIViewAnimationOptionCurveDefaultTransition
102
+ animations:animationBlock
103
+ completion:completionBlock];
104
+ } else {
105
+ diff --git a/node_modules/react-native-screens/lib/typescript/fabric/ModalScreenNativeComponent.d.ts b/node_modules/react-native-screens/lib/typescript/fabric/ModalScreenNativeComponent.d.ts
106
+ index 28d6463..a1473e1 100644
107
+ --- a/node_modules/react-native-screens/lib/typescript/fabric/ModalScreenNativeComponent.d.ts
108
+ +++ b/node_modules/react-native-screens/lib/typescript/fabric/ModalScreenNativeComponent.d.ts
109
+ @@ -55,7 +55,7 @@ export interface NativeProps extends ViewProps {
110
+ gestureResponseDistance?: GestureResponseDistanceType;
111
+ stackPresentation?: WithDefault<StackPresentation, 'push'>;
112
+ stackAnimation?: WithDefault<StackAnimation, 'default'>;
113
+ - transitionDuration?: WithDefault<Int32, 350>;
114
+ + transitionDuration?: WithDefault<Int32, 500>;
115
+ replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>;
116
+ swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>;
117
+ hideKeyboardOnSwipe?: boolean;
118
+ diff --git a/node_modules/react-native-screens/lib/typescript/fabric/ScreenNativeComponent.d.ts b/node_modules/react-native-screens/lib/typescript/fabric/ScreenNativeComponent.d.ts
119
+ index 11ed190..f676e08 100644
120
+ --- a/node_modules/react-native-screens/lib/typescript/fabric/ScreenNativeComponent.d.ts
121
+ +++ b/node_modules/react-native-screens/lib/typescript/fabric/ScreenNativeComponent.d.ts
122
+ @@ -55,7 +55,7 @@ export interface NativeProps extends ViewProps {
123
+ gestureResponseDistance?: GestureResponseDistanceType;
124
+ stackPresentation?: WithDefault<StackPresentation, 'push'>;
125
+ stackAnimation?: WithDefault<StackAnimation, 'default'>;
126
+ - transitionDuration?: WithDefault<Int32, 350>;
127
+ + transitionDuration?: WithDefault<Int32, 500>;
128
+ replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>;
129
+ swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>;
130
+ hideKeyboardOnSwipe?: boolean;
131
+ diff --git a/node_modules/react-native-screens/src/fabric/ModalScreenNativeComponent.ts b/node_modules/react-native-screens/src/fabric/ModalScreenNativeComponent.ts
132
+ index bb59c4c..d4c14ee 100644
133
+ --- a/node_modules/react-native-screens/src/fabric/ModalScreenNativeComponent.ts
134
+ +++ b/node_modules/react-native-screens/src/fabric/ModalScreenNativeComponent.ts
135
+ @@ -90,7 +90,7 @@ export interface NativeProps extends ViewProps {
136
+ gestureResponseDistance?: GestureResponseDistanceType;
137
+ stackPresentation?: WithDefault<StackPresentation, 'push'>;
138
+ stackAnimation?: WithDefault<StackAnimation, 'default'>;
139
+ - transitionDuration?: WithDefault<Int32, 350>;
140
+ + transitionDuration?: WithDefault<Int32, 500>;
141
+ replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>;
142
+ swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>;
143
+ hideKeyboardOnSwipe?: boolean;
144
+ diff --git a/node_modules/react-native-screens/src/fabric/ScreenNativeComponent.ts b/node_modules/react-native-screens/src/fabric/ScreenNativeComponent.ts
145
+ index 4e39336..ab0b313 100644
146
+ --- a/node_modules/react-native-screens/src/fabric/ScreenNativeComponent.ts
147
+ +++ b/node_modules/react-native-screens/src/fabric/ScreenNativeComponent.ts
148
+ @@ -92,7 +92,7 @@ export interface NativeProps extends ViewProps {
149
+ gestureResponseDistance?: GestureResponseDistanceType;
150
+ stackPresentation?: WithDefault<StackPresentation, 'push'>;
151
+ stackAnimation?: WithDefault<StackAnimation, 'default'>;
152
+ - transitionDuration?: WithDefault<Int32, 350>;
153
+ + transitionDuration?: WithDefault<Int32, 500>;
154
+ replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>;
155
+ swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>;
156
+ hideKeyboardOnSwipe?: boolean;
0 commit comments