Last active
March 21, 2018 10:38
-
-
Save olbrichj/71484d361f9171bd85623c83a90dc85e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URLSession.shared.dataTask(with: url!) { data, _, error in | |
if error != nil { | |
print(error) | |
return | |
} | |
DispatchQueue.main.async { | |
imageView.image = UIImage(data: data!) | |
} | |
}.resume() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment