Browse Source

Update UIButton+AFNetworking.m

Bug fix: background image was not being cached
Fernanda G. Geraissate 10 years ago
parent
commit
87a436bca7
1 changed files with 1 additions and 0 deletions
  1. 1 0
      UIKit+AFNetworking/UIButton+AFNetworking.m

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

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