FluidPhoto
FluidPhoto copied to clipboard
Freeze of the whole UI when zooming out with a rapid pan gesture
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!!
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?
To reproducee
- Zoom in on a photo
- Swipe right then left to come back to the photo
- While the animation of swipe is not yet finished, make several pan gestures going down --> should very likely freeze
- 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!
The issue is exactly similar as this one: https://github.com/nytimes/NYTPhotoViewer/issues/254
Is there any good solution?