Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

AFNetworking 2.0 support #8

Open
toftof opened this issue Mar 7, 2015 · 1 comment
Open

AFNetworking 2.0 support #8

toftof opened this issue Mar 7, 2015 · 1 comment

Comments

@toftof
Copy link

toftof commented Mar 7, 2015

Hello can this be updated with AFNetworking 2.0. Appreciate it much. Thanks!

@MrRochito
Copy link

Update to AFNetworking 2.0 PLEASE!!!

The only update for AFNetworking 2.0 is this: Mosaic Cell (UICollectionViewCell) and works!

 if ([_mosaicData.imageFilename hasPrefix:@"http://"] ||
    [_mosaicData.imageFilename hasPrefix:@"https://"]){

NSURL *anURL = [NSURL URLWithString:_mosaicData.imageFilename];
NSURLRequest *anURLRequest = [NSURLRequest requestWithURL:anURL];

AFHTTPRequestOperation *posterOperation = [[AFHTTPRequestOperation alloc] initWithRequest:anURLRequest];
posterOperation.responseSerializer = [AFImageResponseSerializer serializer];
[posterOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {


    if ([newMosaicData.title isEqualToString:_mosaicData.title]){
       self.image = responseObject;
    }

} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    NSLog(@"Now showing poster request failed with error: %@", error);
}];
[posterOperation start];


}else{
    self.image = [UIImage imageNamed:_mosaicData.imageFilename];
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants