Skip to content

Instantly share code, notes, and snippets.

@gregszero
Created January 12, 2017 17:45
Show Gist options
  • Save gregszero/997103d2cf9ed279fc710bb7a89487aa to your computer and use it in GitHub Desktop.
Save gregszero/997103d2cf9ed279fc710bb7a89487aa to your computer and use it in GitHub Desktop.
Load image async with SDWebImage
//
extension UIImageView {
func loadFromUrl(url: String?) {
if let url = url {
self.sd_setImageWithURL(NSURL(string: "\(url)"))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment