I\'d like to load an image from a URL in my application, so I first tried with Objective-C and it worked, however, with Swift, I\'ve a compilation error:
Swift 2.2 || Xcode 7.3
I got Amazing results!! with AlamofireImage swift library
It provides multiple features like:
and very easy to implement for your app
Step.1 Install pods
Alamofire 3.3.x
pod 'Alamofire'
AlamofireImage 2.4.x
pod 'AlamofireImage'
Step.2 import and Use
import Alamofire
import AlamofireImage
let downloadURL = NSURL(string: "http://cdn.sstatic.net/Sites/stackoverflow/company/Img/photos/big/6.jpg?v=f4b7c5fee820")!
imageView.af_setImageWithURL(downloadURL)
that's it!! it will take care everything
Great thanks to Alamofire guys, for making iDevelopers life easy ;)