【发布时间】:2016-05-05 01:18:20
【问题描述】:
我很难弄清楚我如何准确地定义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
【问题讨论】:
-
什么意思? Xcode 中的自动补全应该为您填写参数。你到底有什么问题?
-
@JonShier 我不知道如何定义参数,自动完成没有帮助。
标签: swift alamofireimage