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

Freeze of the whole UI when zooming out with a rapid pan gesture #16

Open
john-work-ios opened this issue Nov 17, 2022 · 4 comments
Open

Comments

@john-work-ios
Copy link

john-work-ios commented Nov 17, 2022

Under investigation on my side, but happens quite often, but not that often:

  • zoom in on an image, zoom out with a very very short pan gesture, then the screen becomes totally unresponsive, including navbar & toolbar

Now that I'm writing this, I also remember that I might have encountered this when swiping left/right when zoomed.

Any idea where this could come from? Reproducable on at least iOS 15 & 16.

Thanks!!

@john-work-ios
Copy link
Author

When it freezes, the view hierarchy shows me two UIImageView on top of each other, containing the same image. The top image view has clipsToBound sets to true. Could it be the transition view?

@john-work-ios
Copy link
Author

To reproducee

  1. Zoom in on a photo
  2. Swipe right then left to come back to the photo
  3. While the animation of swipe is not yet finished, make several pan gestures going down --> should very likely freeze
  4. Repeat this if it did not work

My investigation so far

  • The frozen view is indeed the transition imageView added in containerView in
    ZoomDismissalInteractionController.startInteractiveTransition
  • My logs show that, when it crashes, startInteractiveTransition is called AFTER ZoomDismissalInteractionController.didPanWith (with state.ended), and since the transition view is not yet build in didPanWith, didPanWith will return in its guard block, preventing the transitionView to be removed from containerView

Any help is appreciated, as I'm a beginner with animations. Thanks!

@john-work-ios john-work-ios changed the title Rare freeze of the whole UI when zoom in has finished Freeze of the whole UI when zooming out with a rapid pan gesture Nov 18, 2022
@john-work-ios
Copy link
Author

The issue is exactly similar as this one: nytimes/NYTPhotoViewer#254

@CJaeson
Copy link

CJaeson commented Aug 18, 2023

Is there any good solution?

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

No branches or pull requests

2 participants