Search code examples
iossdwebimage

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


I have a lot of group images displaying for user to download optional. What I wanna do is that if user already download it, my UILabel should show "already downloaded", and "download" if user didn't download yet.

I use SDWebImage, so how to know a specific url image is already downloaded?


Solution

  • Import

    #import <SDWebImageManager.h>
    

    Then

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