如何知道特定的 url 图像已经使用 SDWebImage 库下载?

How to know a specific url image is already downloaded with using SDWebImage library?

我有很多组图显示供用户下载可选。我想做的是,如果用户已经下载了它,我的 UILabel 应该显示 "already downloaded",如果用户还没有下载,我的 UILabel 应该显示 "download"。

我使用 SDWebImage,那么如何知道特定的 url 图片已经下载?

导入

#import <SDWebImageManager.h>

然后

BOOL isCached =  [[SDWebImageManager sharedManager] diskImageExistsForURL:imageURL];