我试图找出一个图像是否已经使用SDWeb
Image缓存,但是当我尝试使用此方法时,我收到错误“对成员的模糊引用’cachedIageExistsForURL”.
let bool = SDWebImageManager.cachedImageExistsForURL(imgURL)
我正在使用Swift,我有一个桥接头来使用该库.
解决方法
cachedImageExistsForURL
不是SDWebImageManager上的类方法,它是您需要在sharedInstance上使用的实例方法:
SDWebImageManager.sharedManager().cachedImageExistsForURL(imgURL)