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

Add panBoundsPoint property to TransitionGestureHandler #15

Merged
merged 1 commit into from Feb 2, 2017
Merged

Add panBoundsPoint property to TransitionGestureHandler #15

merged 1 commit into from Feb 2, 2017

Conversation

felipowsky
Copy link
Contributor

I was looking for a way to configure an end point to the pan gesture so the interactive transition would look smoother.

Imagine that you have a targetView that its position starts at the bottom of the screen with a pan gesture handler configured with top direction and ends at the center of the screen when transitioning to the next viewController. In current implementation the user would need to pan until the top of the screen and the targetView would look misplaced compared to the user's finger.

This PR fixes that by introducing a newCGPoint property to TransitionGestureHandler called panBoundsPoint.
When panBoundsPoint is set the percentComplete will take into account the panBoundsPoint as the endPoint of the transition instead of the targetVC.view.bounds.

To be honest I'm happy with the results but it seems that there's a best way to handle this.
Anyway it was the solution I came up with now.

Let me know what you think.

@xxxAIRINxxx
Copy link
Owner

@felipowsky
Great!
Thanks 👍

@xxxAIRINxxx xxxAIRINxxx merged commit bf663d1 into xxxAIRINxxx:master Feb 2, 2017
@felipowsky felipowsky deleted the features/pan-bounds-point branch April 4, 2017 01:27
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.

None yet

2 participants