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!)
bookmark
dashboard

Sun Jan 12 2020 17:30:26 GMT+0000 (UTC) https://stackoverflow.com/questions/24231680/loading-downloading-image-from-url-on-swift

#ios #swift #swift4

Save snippets that work with our extensions

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