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

Fix for PanGestureCancelled state #193

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

eugene-manaev
Copy link

Probably, there can be many other cases, which will be fix by this line of code.

Fixes issue, when you trying to dismiss NYTPhotoViewer (being landscape), which presented by portrait-only controller. In that case panGestureRecognizer.state turns to "cancelled".

If not to handle this, photo stays with the same frame as on the moment of touch cancellation.
Even if you continue dragging your finger, nothing will be happened, because we lost the touch!

We should treat that state the same way as "ended", because by the fact it ended.

Can be reproduced:
iOS >= 8.0

I can provide video with "steps to reproduce", if you need this.

Fixes issue, when you trying to dismiss NYTPhotoViewer (being landscape), which presented by portrait-only controller.
In that case panGestureRecognizer.state turns to "cancelled". We should treat that state the same way as "ended", because by the fact it ended.

Probably, there can be many other cases, which will be fix by this line of code.

Can be reproduced: 
iOS >= 8.0

I can provide video with "steps to reproduce", if you need this.
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.

1 participant