CropImageView
CropImageView copied to clipboard
Pinch to zoom freezes app.
Hi, the zoom at the bottom works fine, but when I pinch to zoom and release the cropper freezes the app.
iOS 15+, SwiftUI 5+, Xcode 13+
It seems like there is an issue with SwiftUI's MagnificationGesture(). I am researching other ways of zooming. https://developer.apple.com/forums/thread/689117
I fixed it by dispatching scale changes asynchronously with DispatchQueue.main.async. May do a pull request for this if i have time.
One theory for freezes like this is that GeometryReader goes into an endless loop, which does not happen if the scale change is updated in an async manner.