FluidPhoto icon indicating copy to clipboard operation
FluidPhoto copied to clipboard

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

Open john-work-ios opened this issue 2 years ago • 4 comments

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 avatar Nov 17 '22 13:11 john-work-ios

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 avatar Nov 18 '22 08:11 john-work-ios

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 avatar Nov 18 '22 10:11 john-work-ios

The issue is exactly similar as this one: https://github.com/nytimes/NYTPhotoViewer/issues/254

john-work-ios avatar Nov 18 '22 12:11 john-work-ios

Is there any good solution?

CJaeson avatar Aug 18 '23 06:08 CJaeson