Im having a hard to figuring out how exactly I can define the ProgressHandler
parameter. The typealias
is defined aspublic typealias ProgressHandler = (bytesSent: Int64, totalBytesSent: Int64, totalExpectedBytes: Int64) -> Void
More information can be found here https://github.com/Alamofire/AlamofireImage/pull/91
let URLRequest = NSURLRequest(URL: NSURL(string: "https://httpbin.org/image/jpeg")!)
ImageDownloader().downloadImages(URLRequests: [URLRequest], filter: nil,
progress: (init progress here), progressQueue: dispatch_get_main_queue(), completion: {
_ in
})
NOT A DUPLICATE! Answer/question referenced is what lead to this feature being implemented https://stackoverflow.com/a/33503205/5222077