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()?)
ABImageView
is instantiated outside theDispatchQueue.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
andimageView
instances into the async callback/block. I'm also callingimageView.setupGestures()
beforecompletion()
instead of after (is that okay or is there a reason for calling it aftercompletion()
?)