Snippets Collections
let url = URL(string: image.url)
let data = try? Data(contentsOf: url!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
imageView.image = UIImage(data: data!)

Sun Jan 12 2020 17:30:26 GMT+0000 (UTC)

#ios #swift #swift4

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension