Skip to content

Instantly share code, notes, and snippets.

@KirillKudaev
Created June 27, 2020 01:03
Show Gist options
  • Select an option

  • Save KirillKudaev/4a5b610e06eaf0bb373fd940a8f06755 to your computer and use it in GitHub Desktop.

Select an option

Save KirillKudaev/4a5b610e06eaf0bb373fd940a8f06755 to your computer and use it in GitHub Desktop.
@IBOutlet weak var imageView: UIImageView!
func setImageToImageView() {
fetchImage { (imageData) in
if let data = imageData {
DispatchQueue.main.async {
self.imageView.image = UIImage(data: data)
}
} else {
print("Hello");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment