【发布时间】:2016-11-16 05:23:37
【问题描述】:
我正在使用SDWebImage 下载图像。如果图片下载成功,我想做进一步的操作。
cell.appIcon.sd_setImage(with: url, placeholderImage: UIImage.init(named: "App-Default"), completed: {(image: UIImage!, error: NSError!, cacheType: SDImageCacheType, imageURL: URL!) -> Void in
// Perform operation.
})
但我收到错误:
无法将类型 '(UIImage!, NSError!, SDImageCacheType, URL!) -> Void' 的值转换为预期的参数类型 'SDExternalCompletionBlock?'
【问题讨论】:
-
我收到此错误...无法将类型 '(UIImage!, NSError!, SDImageCacheType, URL!) -> Void' 的值转换为预期的参数类型 'SDExternalCompletionBlock?'
-
这不应该是评论,应该与您的问题一起发布
-
我的代码是:cell.appIcon.sd_setImage(with: url, placeholderImage: UIImage.init(named: "App-Default"), completed: {(image: UIImage!, error: NSError! , cacheType: SDImageCacheType, imageURL: URL!) -> Void in // 执行操作。})
-
我正在使用更新的 SDWebImage 库。
标签: ios swift3 sdwebimage