-
Notifications
You must be signed in to change notification settings - Fork 170
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
feat: support async crop #232
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to also have an API where activityIndicator
isn't used at all. I'd want to have my own loading view shown instead of the one from the library
Thanks for the suggestion! I will think about it. |
activityIndicator.isHidden = false | ||
activityIndicator.startAnimating() | ||
|
||
DispatchQueue.global(qos: .userInteractive).async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also need?
DispatchQueue.global(qos: .userInteractive).async { | |
DispatchQueue.global(qos: .userInteractive).async { [weak self] in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it is not needed. DispatchQueue does not hold strong self to it won't cause retain cycle.
You can test it by putting a breakpoint in deinit
I found some code in crop() which should only be called in the main thread. I need to fix them. |
Fixed |
I created a new issue #233 and plan to do it in a separate PR. |
fix #161