我很难弄清楚我如何准确地定义ProgressHandler
参数。被typealias
定义为public typealias ProgressHandler = (bytesSent: Int64, totalBytesSent: Int64, totalExpectedBytes: Int64) -> Void
更多信息可以在这里找到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
})
不是重复的!引用的答案/问题是导致此功能实施的原因 https://stackoverflow.com/a/33503205/5222077