Skip to content

Instantly share code, notes, and snippets.

@MaciejGad
Last active April 14, 2016 19:38
Show Gist options
  • Save MaciejGad/fa8cb80dfc73ea55edeedb75418ea2ec to your computer and use it in GitHub Desktop.
Save MaciejGad/fa8cb80dfc73ea55edeedb75418ea2ec to your computer and use it in GitHub Desktop.
Set image with URL
//remember to intall AFNetworking https://github.com/AFNetworking/AFNetworking#installation-with-cocoapods
//and add import :
//#import "UIImageView+AFNetworking.h"
- (void)setImageFromDictionary:(NSDictionary *)dic2 {
NSString *path = dic2[@"safe_value"];
if (![path isKindOfClass:[NSString class]]) {
return;
}
NSURL *imageUrl = [NSURL URLWithString:path];
[self.dogimageView setImageWithURL:imageUrl];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment