Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add full width back gesture on ios #1030

Closed
wants to merge 1 commit into from

Conversation

JackShannon
Copy link

Description

#251

This is a hacky solution. I think in order for this to be part of the library there would need to be an option to turn it on/off.

Changes

Changed the gestureRecognizer to a UIPanGestureRecognizer.

Screenshots / GIFs

Here you can add screenshots / GIFs documenting your change.

You can add before / after section if you're changing some behavior.

Before

You have to swipe from the left edge

After

You can swipe from anywhere:

ezgif-6-ab8f70027cea

-->

Test code and steps to reproduce

Checklist

@JackShannon
Copy link
Author

An alternative solution could be to add our own UIScreenEdgePanGestureRecognizer instead of UIPanGestureRecognizer. https://developer.apple.com/documentation/uikit/uiscreenedgepangesturerecognizer?language=objc

That way the api could be consistent with react navigations stack navigator and could use gestureResponseDistance to set the edges.

@WoLewicki
Copy link
Member

I tested this PR and unfortunately it resolves in some nondeterministic behaviors like freeze of screen when trying to swipe the first screen on stack. I added another version of this PR in #1072. Can you check if it works as you would expect it to and if so, can we close this PR?

@JackShannon
Copy link
Author

I tested this PR and unfortunately it resolves in some nondeterministic behaviors like freeze of screen when trying to swipe the first screen on stack. I added another version of this PR in #1072. Can you check if it works as you would expect it to and if so, can we close this PR?

Works brilliantly, thank you!

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.

2 participants