AFNetworking/AFNetworking — pull request #729 by tiemevanveen (2013-01-08 14:13:26+00:00)
Title: Precaution for UIImage ImageWithURLRequest

The following code does not give a warning in xcode..Quite strange.

It took me some time to find the problem. This commit makes sure the URL is always wrapped in a NSURLRequest.

[myImageView setImageWithURLRequest:[NSURL URLWithString:@"http://example.com/image.png"]
placeholderImage:[UIImage imageNamed:@"placeholder"]
success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) {
//do something
} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error) {
//do nothing
}];