adbutler / adbutler-ios-sdk

Apache License 2.0
2 stars 1 forks source link

fix: call UIImageView initializer on main thread #3

Open ts95 opened 5 years ago

ts95 commented 5 years ago

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()?)

aneena-thomas commented 5 years ago

Any update on merging this PR.