SDWebImage下载图片有时候无法成功显示出来

之前用下面的方法现在图片,有时候会出现图片没有下载成功显示:
  - (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder;
  后来研究下,还有下面的方法:
  - (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options;

  重点就在这个SDWebImageOptions上,文档提示如下:

* SDWebImageRetryFailed = 1<< 0,    默认选项,失败后重试

* SDWebImageLowPriority = 1<< 1,     使用低优先级

* SDWebImageCacheMemoryOnly = 1<< 2,    仅仅使用内存缓存

* SDWebImageProgressiveDownload = 1<< 3,    显示现在进度

* SDWebImageRefreshCached = 1<< 4,     刷新缓存

* SDWebImageContinueInBackground =1 << 5,    后台继续下载图像

* SDWebImageHandleCookies = 1<< 6,     处理 Cookie

* SDWebImageAllowInvalidSSLCertificates= 1 << 7,     允许无效的 SSL 验证

* SDWebImageHighPriority = 1<< 8,      高优先级

* SDWebImageDelayPlaceholder = 1<< 9      延迟显示占位图片


你可能感兴趣的:(iOS)