Browse Source

Merge pull request #2331 from johnbushnell/UIButton-caching-fix

Update UIButton+AFNetworking.m
Mattt Thompson 11 years ago
parent
commit
a31add8005
1 changed files with 1 additions and 0 deletions
  1. 1 0
      UIKit+AFNetworking/UIButton+AFNetworking.m

+ 1 - 0
UIKit+AFNetworking/UIButton+AFNetworking.m

@@ -167,6 +167,7 @@ static const char * af_backgroundImageRequestOperationKeyForState(UIControlState
                     [strongSelf setImage:responseObject forState:state];
                     [strongSelf setImage:responseObject forState:state];
                 }
                 }
             }
             }
+            [[[strongSelf class] sharedImageCache] cacheImage:responseObject forRequest:urlRequest];
         } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
         } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
             if ([[urlRequest URL] isEqual:[operation.response URL]]) {
             if ([[urlRequest URL] isEqual:[operation.response URL]]) {
                 if (failure) {
                 if (failure) {