Created
December 2, 2014 22:33
-
-
Save spacedrabbit/5a75ac741054e1112a8e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[pugImageOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) | |
{ | |
UIImage * pugImage = (UIImage *)responseObject; | |
// 1 | |
[[NSOperationQueue mainQueue] addOperationWithBlock:^ | |
{ | |
imageBlock(pugImage); | |
[self.tableView reloadData]; | |
}]; | |
} | |
failure:^(AFHTTPRequestOperation *operation, NSError *error) | |
{ | |
NSLog(@"The error: %@", error); | |
}]; | |
//2 | |
[pugRushQueue addOperation:pugImageOperation]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment