Do not load placeholder image if SDWebImageDelayPlaceholder option specified.

This commit is contained in:
Rok Gregorič 2014-06-24 12:37:21 +02:00
parent 50c4d1d2eb
commit 8d668b4121
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}