SDWebImage有一个选项[SDWebImageRefreshCached]来解决问题.
/** * Even if the image is cached,respect the http response cache control,and refresh the image from remote location if needed. * The disk caching will be handled by NSURLCache instead of SDWebImage leading to slight performance degradation. * This option helps deal with images changing behind the same request URL,e.g. Facebook graph API profile pics. * If a cached image is refreshed,the completion block is called once with the cached image and again with the final image. * * Use this flag only if you can't make your URLs static with embedded cache busting parameter. */ SDWebImageRefreshCached = 1 << 4,
如何解决翠鸟的问题?
解决方法 Kingfisher有forceRefresh选项强制下载图像再次滑动缓存imageVIEw.kf.setimage(with: url,options: [.forceRefresh])
有关详细信息,请参阅此github线程
总结以上是内存溢出为你收集整理的ios – 当图像网址没有改变但图像改变时,如何使用翠鸟设置图像全部内容,希望文章能够帮你解决ios – 当图像网址没有改变但图像改变时,如何使用翠鸟设置图像所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)