Merge pull request #780 from rokgregoric/master

Do not load placeholder image if SDWebImageDelayPlaceholder option specified.
This commit is contained in:
Bogdan Poplauschi 2014-06-24 18:29:09 +03:00
commit 3a7adbbacf
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;
}