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

fix: call UIImageView initializer on main thread #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ts95
Copy link

@ts95 ts95 commented Feb 25, 2019

ABImageView is instantiated outside the DispatchQueue.main.async callback in a background thread. This results in the following warning: runtime: UI API called from background thread: UIImageView.init(image:) must be used from main thread only.

I've moved the image and imageView instances into the async callback/block. I'm also calling imageView.setupGestures() before completion() instead of after (is that okay or is there a reason for calling it after completion()?)

Solves this issue:
runtime: UI API called from background thread:
UIImageView.init(image:) must be used from main thread only
@aneena-thomas
Copy link

Any update on merging this PR.

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

Successfully merging this pull request may close these issues.

2 participants