Fixing race condition in UIImageView category with cached images. Thanks @iwat (Chaiwat S.)
This commit is contained in:
parent
e7f799484a
commit
e9855af89d
1 changed files with 1 additions and 0 deletions
|
|
@ -92,6 +92,7 @@ static char kAFImageRequestOperationObjectKey;
|
|||
UIImage *cachedImage = [[AFImageCache sharedImageCache] cachedImageForURL:[urlRequest URL] cacheName:nil];
|
||||
if (cachedImage) {
|
||||
self.image = cachedImage;
|
||||
self.af_imageRequestOperation = nil;
|
||||
|
||||
if (success) {
|
||||
success(nil, nil, cachedImage);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue