Skip to content

Commit c711d3c

Browse files
authored
refactor!: remove deprecated ios stack animation (#2361)
## Description Removes stackAnimation "ios" option in v4 after making it deprecated in 3.x. ## Checklist - [ ] Included code example that can be used to test this change - [x] Updated TS types - [x] Updated documentation: <!-- For adding new props to native-stack --> - [x] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md - [x] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md - [x] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx - [x] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx - [ ] Ensured that CI passes
1 parent 606cd4b commit c711d3c

File tree

13 files changed

+0
-16
lines changed

13 files changed

+0
-16
lines changed

android/src/main/java/com/swmansion/rnscreens/Screen.kt

-1
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ class Screen(
435435
SLIDE_FROM_RIGHT,
436436
SLIDE_FROM_LEFT,
437437
FADE_FROM_BOTTOM,
438-
IOS,
439438
IOS_FROM_RIGHT,
440439
IOS_FROM_LEFT,
441440
}

android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt

-3
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ class ScreenStack(
182182
R.anim.rns_no_animation_medium,
183183
)
184184
StackAnimation.FADE_FROM_BOTTOM -> it.setCustomAnimations(R.anim.rns_fade_from_bottom, R.anim.rns_no_animation_350)
185-
StackAnimation.IOS -> it.setCustomAnimations(R.anim.rns_ios_from_right_foreground_open, R.anim.rns_ios_from_right_background_open)
186185
StackAnimation.IOS_FROM_RIGHT -> it.setCustomAnimations(R.anim.rns_ios_from_right_foreground_open, R.anim.rns_ios_from_right_background_open)
187186
StackAnimation.IOS_FROM_LEFT -> it.setCustomAnimations(R.anim.rns_ios_from_left_foreground_open, R.anim.rns_ios_from_left_background_open)
188187
}
@@ -222,7 +221,6 @@ class ScreenStack(
222221
R.anim.rns_slide_out_to_bottom,
223222
)
224223
StackAnimation.FADE_FROM_BOTTOM -> it.setCustomAnimations(R.anim.rns_no_animation_250, R.anim.rns_fade_to_bottom)
225-
StackAnimation.IOS -> it.setCustomAnimations(R.anim.rns_ios_from_right_foreground_close, R.anim.rns_ios_from_right_background_close)
226224
StackAnimation.IOS_FROM_RIGHT -> it.setCustomAnimations(R.anim.rns_ios_from_right_background_close, R.anim.rns_ios_from_right_foreground_close)
227225
StackAnimation.IOS_FROM_LEFT -> it.setCustomAnimations(R.anim.rns_ios_from_left_background_close, R.anim.rns_ios_from_left_foreground_close)
228226
}
@@ -417,7 +415,6 @@ class ScreenStack(
417415
Build.VERSION.SDK_INT >= 33 ||
418416
fragmentWrapper.screen.stackAnimation === StackAnimation.SLIDE_FROM_BOTTOM ||
419417
fragmentWrapper.screen.stackAnimation === StackAnimation.FADE_FROM_BOTTOM ||
420-
fragmentWrapper.screen.stackAnimation === StackAnimation.IOS ||
421418
fragmentWrapper.screen.stackAnimation === StackAnimation.IOS_FROM_RIGHT ||
422419
fragmentWrapper.screen.stackAnimation === StackAnimation.IOS_FROM_LEFT
423420
}

android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt

-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ open class ScreenViewManager :
142142
"slide_from_left" -> Screen.StackAnimation.SLIDE_FROM_LEFT
143143
"slide_from_bottom" -> Screen.StackAnimation.SLIDE_FROM_BOTTOM
144144
"fade_from_bottom" -> Screen.StackAnimation.FADE_FROM_BOTTOM
145-
"ios" -> Screen.StackAnimation.IOS
146145
"ios_from_right" -> Screen.StackAnimation.IOS_FROM_RIGHT
147146
"ios_from_left" -> Screen.StackAnimation.IOS_FROM_LEFT
148147
else -> throw JSApplicationIllegalArgumentException("Unknown animation type $animation")

apps/src/screens/Animations.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ const MainScreen = ({
5252
'slide_from_bottom',
5353
'slide_from_right',
5454
'slide_from_left',
55-
'ios',
5655
'ios_from_right',
5756
'ios_from_left',
5857
'none',

apps/src/screens/Events.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ const MainScreen = ({
8383
'slide_from_bottom',
8484
'slide_from_right',
8585
'slide_from_left',
86-
'ios',
8786
'ios_from_right',
8887
'ios_from_left',
8988
'none',

guides/GUIDE_FOR_LIBRARY_AUTHORS.md

-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ Allows for the customization of how the given screen should appear/disappear whe
221221
- `"slide_from_bottom"` - slide in the new screen from bottom to top
222222
- `"slide_from_right"` - slide in the new screen from right to left (Android only, resolves to default transition on iOS)
223223
- `"slide_from_left"` - slide in the new screen from left to right
224-
- `"ios"` - @deprecated iOS like slide in animation. pushes in the new screen from right to left (Android only, resolves to default transition on iOS) (will be removed in v4.0.0 in favor of `ios_from_right`)
225224
- `"ios_from_right"` - iOS like slide in animation. pushes in the new screen from right to left (Android only, resolves to default transition on iOS)
226225
- `"ios_from_left"` - iOS like slide in animation. pushes in the new screen from left to right (Android only, resolves to default transition on iOS)
227226
- `"none"` – the screen appears/disappears without an animation

ios/RNSConvert.mm

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ + (RNSScreenStackAnimation)RNSScreenStackAnimationFromCppEquivalent:(react::RNSS
5353
switch (stackAnimation) {
5454
// these four are intentionally grouped
5555
case react::RNSScreenStackAnimation::Slide_from_right:
56-
case react::RNSScreenStackAnimation::Ios:
5756
case react::RNSScreenStackAnimation::Ios_from_right:
5857
case react::RNSScreenStackAnimation::Default:
5958
return RNSScreenStackAnimationDefault;

ios/RNSScreen.mm

-1
Original file line numberDiff line numberDiff line change
@@ -1961,7 +1961,6 @@ @implementation RCTConvert (RNSScreen)
19611961
@"slide_from_bottom" : @(RNSScreenStackAnimationSlideFromBottom),
19621962
@"slide_from_right" : @(RNSScreenStackAnimationDefault),
19631963
@"slide_from_left" : @(RNSScreenStackAnimationSlideFromLeft),
1964-
@"ios" : @(RNSScreenStackAnimationDefault),
19651964
@"ios_from_right" : @(RNSScreenStackAnimationDefault),
19661965
@"ios_from_left" : @(RNSScreenStackAnimationSlideFromLeft),
19671966
}),

native-stack/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ How the given screen should appear/disappear when pushed or popped at the top of
328328
- `slide_from_bottom` – performs a slide from bottom animation
329329
- `slide_from_right` - slide in the new screen from right to left (Android only, resolves to default transition on iOS)
330330
- `slide_from_left` - slide in the new screen from left to right
331-
- `"ios"` - @deprecated iOS like slide in animation. pushes in the new screen from right to left (Android only, resolves to default transition on iOS) (will be removed in v4.0.0 in favor of `ios_from_right`)
332331
- `"ios_from_right"` - iOS like slide in animation. pushes in the new screen from right to left (Android only, resolves to default transition on iOS)
333332
- `"ios_from_left"` - iOS like slide in animation. pushes in the new screen from left to right (Android only, resolves to default transition on iOS)
334333
- `none` - the screen appears/disappears without an animation.

src/fabric/ScreenNativeComponent.ts

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ type StackAnimation =
5858
| 'slide_from_left'
5959
| 'slide_from_bottom'
6060
| 'fade_from_bottom'
61-
| 'ios'
6261
| 'ios_from_right'
6362
| 'ios_from_left';
6463

src/native-stack/types.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ export type NativeStackNavigationOptions = {
448448
* - "slide_from_bottom" – performs a slide from bottom animation
449449
* - "slide_from_right" - slide in the new screen from right to left (Android only, resolves to default transition on iOS)
450450
* - "slide_from_left" - slide in the new screen from left to right
451-
* - "ios" - @deprecated iOS like slide in animation. pushes in the new screen from right to left (Android only, resolves to default transition on iOS) (will be removed in v4.0.0 in favor of `ios_from_right`)
452451
* - "ios_from_right" - iOS like slide in animation. pushes in the new screen from right to left (Android only, resolves to default transition on iOS)
453452
* - "ios_from_left" - iOS like slide in animation. pushes in the new screen from left to right (Android only, resolves to default transition on iOS)
454453
* - "none" – the screen appears/dissapears without an animation

src/types.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export type StackAnimationTypes =
3939
| 'slide_from_bottom'
4040
| 'slide_from_right'
4141
| 'slide_from_left'
42-
| 'ios'
4342
| 'ios_from_right'
4443
| 'ios_from_left';
4544
export type BlurEffectTypes =
@@ -386,7 +385,6 @@ export interface ScreenProps extends ViewProps {
386385
* - `slide_from_bottom` – performs a slide from bottom animation
387386
* - "slide_from_right" - slide in the new screen from right to left (Android only, resolves to default transition on iOS)
388387
* - "slide_from_left" - slide in the new screen from left to right
389-
* - "ios" - @deprecated iOS like slide in animation. pushes in the new screen from right to left (Android only, resolves to default transition on iOS) (will be removed in v4.0.0 in favor of `ios_from_right`)
390388
* - "ios_from_right" - iOS like slide in animation. pushes in the new screen from right to left (Android only, resolves to default transition on iOS)
391389
* - "ios_from_left" - iOS like slide in animation. pushes in the new screen from left to right (Android only, resolves to default transition on iOS)
392390
* - "none" – the screen appears/dissapears without an animation

windows/RNScreens/Screen.h

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ enum class StackAnimation {
1111
SIMPLE_FROM_BOTTOM,
1212
SLIDE_FROM_RIGHT,
1313
SLIDE_FROM_LEFT,
14-
IOS,
1514
IOS_FROM_RIGHT,
1615
IOS_FROM_LEFT
1716
};

0 commit comments

Comments
 (0)