【发布时间】:2016-08-10 07:51:17
【问题描述】:
我将AlamofireImage 与PromiseKit 和Alamofire 结合使用。我使用 Promise 链接下载 x 个图像,因为我想同步执行此操作。我似乎无法理解ImageDownloader() 是自动缓存还是必须将图像显式添加到缓存中?到目前为止,我看到的唯一示例不是使用ImageDownloader,所以我很难找到答案。
如果没有 - 我如何将其添加到缓存中?我试过使用:
self.imageDownloader.imageCache?.addImage(image, withIdentifier: imageUrl)
但它所做的只是永远增加我的内存使用量(即一遍又一遍地将相同的图像添加到缓存中)
【问题讨论】:
标签: ios swift alamofire alamofireimage