From 8d668b412180287332325bd5c6d3e743dc0e5e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rok=20Gregoric=CC=8C?= Date: Tue, 24 Jun 2014 12:37:21 +0200 Subject: [PATCH] Do not load placeholder image if SDWebImageDelayPlaceholder option specified. --- SDWebImage/UIImageView+WebCache.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SDWebImage/UIImageView+WebCache.m b/SDWebImage/UIImageView+WebCache.m index 25299e9..3be9c22 100644 --- a/SDWebImage/UIImageView+WebCache.m +++ b/SDWebImage/UIImageView+WebCache.m @@ -42,8 +42,7 @@ static char operationArrayKey; - (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock { [self cancelCurrentImageLoad]; objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC); - self.image = placeholder; - + if (!(options & SDWebImageDelayPlaceholder)) { self.image = placeholder; }