Execute block passed into UIImageView request if getting an image out of the cache

This commit is contained in:
Mattt Thompson 2011-08-14 19:48:31 -05:00
parent da1fa38bd4
commit b734a64add

View file

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