Merge pull request #1448 from samgro/master

Add image response serializer to UIButton+AFNetworking. Fixes #1447.
This commit is contained in:
Mattt Thompson 2013-10-07 15:44:30 -07:00
commit a0f526701d

View File

@ -99,6 +99,7 @@ static char kAFBackgroundImageRequestOperationKey;
__weak __typeof(self)weakSelf = self;
self.af_imageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest];
self.af_imageRequestOperation.responseSerializer = [AFImageResponseSerializer serializer];
[self.af_imageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
__strong __typeof(weakSelf)strongSelf = weakSelf;
if ([[urlRequest URL] isEqual:[operation.request URL]]) {