Execute block passed into UIImageView request if getting an image out of the cache
This commit is contained in:
parent
da1fa38bd4
commit
b734a64add
@ -97,6 +97,10 @@ static NSString * const kUIImageViewImageRequestObjectKey = @"imageRequestOperat
|
||||
UIImage *cachedImage = [[AFImageCache sharedImageCache] cachedImageForRequest:request imageSize:imageSize options:options];
|
||||
if (cachedImage) {
|
||||
self.image = cachedImage;
|
||||
|
||||
if (block) {
|
||||
block(cachedImage);
|
||||
}
|
||||
} else {
|
||||
self.image = placeholderImage;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user