Skip to content

Instantly share code, notes, and snippets.

@Broich
Created February 13, 2014 07:33
Show Gist options
  • Save Broich/8971235 to your computer and use it in GitHub Desktop.
Save Broich/8971235 to your computer and use it in GitHub Desktop.
UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.swipeView.frame];
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@", DefiImageURL, self.defi.imageURLs[index]]];
NSLog(@"%@", url);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setValue:AuthorizationTokenValue forHTTPHeaderField:@"X-AUTH-TOKEN"];
__weak UIImageView *myImageView = imageView;
imageView = myImageView;
[imageView setImageWithURLRequest:request placeholderImage:nil success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) {
myImageView.image = image;
}failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error) {
}];
return imageView;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment