如何升级:

ImageDownloader().downloadImage(URLRequest: URLRequest) { response in
  ...
}

到最新的AlamofireImagedownloadImage(URLRequest:)似乎不再工作了。

最佳答案

downloadImage(URLRequest:)已重命名为download(_:)。查看AlamofireImage on Github了解更多信息。

let downloader = ImageDownloader()

downloader.download(urlRequest) { response in
  ...
}

10-08 01:03