Created
February 13, 2014 07:33
-
-
Save Broich/8971235 to your computer and use it in GitHub Desktop.
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
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