What happens to SDWebImage Cached Images in my app when the image file on the server changes?

后端 未结 10 1246
夕颜
夕颜 2020-12-07 09:57

I am using the SDWebImage library to cache web images in my app:

https://github.com/rs/SDWebImage/blob/master/README.md

Current Usage:



        
10条回答
  •  猫巷女王i
    2020-12-07 10:09

    You can use options parameter.

    Swift version:

    imageView.sd_setImage(with: URL(string: URLWithString:profilePictureUrl),
                          placeholderImage: UIImage(named: "placeholder"),
                          options: .refreshCached,
                          completed: nil)
    

    Objective-C version:

    [imageView sd_setImageWithURL:[NSURL URLWithString:profilePictureUrl]
                 placeholderImage:[UIImage imageNamed:@"placeholder.png"]
                 options:SDWebImageRefreshCached
                 completed: nil];
    

    Cheers!

提交回复
热议问题