Created
March 2, 2014 16:30
-
-
Save quard8/9309111 to your computer and use it in GitHub Desktop.
Loading images for UITableViewCell with AFNetworking
This file contains hidden or 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
| __weak QEventCell *weakCell = cell; | |
| [cell.imageView setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:event.poster]] placeholderImage:[UIImage imageNamed:@"placeholder"] success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) { | |
| weakCell.imageView.image = image; | |
| [weakCell setNeedsLayout]; | |
| } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error) { | |
| }]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment