Skip to content

Conversation

kmichalikk
Copy link
Collaborator

Description

Resolves [iOS] Bring back fullScreenSwipeEnabled on iOS 26.

This PR brings back fullScreenSwipeEnabled prop on iOS 26. The type of the prop is changed internally to OptionalBoolean with default value differing between versions.

Test code and steps to reproduce

Use Test3093

Copy link
Contributor

@kligarski kligarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update docs in src/types.tsx.

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good. I have some requests though. Please answer them.

Good job!

Comment on lines 59 to 64
For iOS prior to 26, swiping with this option results in the same transition animation as `simple_push` by default.
It can be changed to other custom animations with `customAnimationOnSwipe` prop, but default iOS swipe animation
is not achievable due to usage of custom recognizer.

For iOS 26 and up, native `interactiveContentPopGestureRecognizer` is used, and this prop controls whether it should
be enabled or not.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get impression from this description that customAnimationOnSwipe does not work anymore on iOS 26 & I remember from testing that was not the case, was it?

If it still works, we should rephrase the description so that it indicates that customAnimationOnSwipe is possible in both cases but it results in new native gesture recognizer not being used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ios/RNSScreen.h Outdated
Comment on lines 167 to 171
/**
* Returns a boolean equivalent of fullScreenSwipeEnabled OptionalBoolean, resolves Undefined as `false` for iOS < 26,
* `true` otherwise.
*/
- (BOOL)fullScreenSwipeEnabledBoolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this approach here. Please take a look how obscureBackground, which also uses RNSOptionalBoolean is implemented & follow that pattern.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is somewhat different, because the value is used in RNSScreenStack, and for obscureBackground there is no usages outside of the context it's declared in. Could you point me in some direction here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I could see fullScreenSwipeEnabled property being readonly, overwrite the getter to return appropriate BOOL value & we do not need any additional method here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backing field can be of RNSOptionalBoolean type obviously.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

62e1a05
I'm still not sure we understand each other, please take a look

@kmichalikk kmichalikk requested a review from kkafar September 30, 2025 07:09
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Responded to your question

ios/RNSScreen.h Outdated
Comment on lines 167 to 171
/**
* Returns a boolean equivalent of fullScreenSwipeEnabled OptionalBoolean, resolves Undefined as `false` for iOS < 26,
* `true` otherwise.
*/
- (BOOL)fullScreenSwipeEnabledBoolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I could see fullScreenSwipeEnabled property being readonly, overwrite the getter to return appropriate BOOL value & we do not need any additional method here.

@kmichalikk kmichalikk requested a review from kkafar October 1, 2025 12:36
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you!

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upon request, revisiting my approach here

@kmichalikk kmichalikk merged commit b12dd03 into main Oct 2, 2025
9 checks passed
@kmichalikk kmichalikk deleted the @kmichalikk/fullscreen-swipe-enabled-ios26 branch October 2, 2025 07:33
@terrysahaidak
Copy link

terrysahaidak commented Oct 16, 2025

@kkafar @kmichalikk is it possible to use this prop with a vertical scroll view? somehow if i have scroll view from the gesture handler in the screen it won't swipe on iOS 26. only on the very edge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants