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

Pinch to zoom freezes app. #1

Open
pmasonuh opened this issue Mar 4, 2022 · 2 comments
Open

Pinch to zoom freezes app. #1

pmasonuh opened this issue Mar 4, 2022 · 2 comments

Comments

@pmasonuh
Copy link

pmasonuh commented Mar 4, 2022

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+

@johngoren
Copy link
Contributor

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

@johngoren
Copy link
Contributor

johngoren commented Feb 7, 2023

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.

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