Posted at

UIImageViewにtwitterのthumbnail画像当てる

More than 5 years have passed since last update.

NSURL *url = [NSURL URLWithString:[[status valueForKey:@"user"] valueForKey:@"profile_image_url"]];

NSURLRequest *request = [NSURLRequest requestWithURL:url];
NSURLResponse *response = nil;
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:nil];
UIImage *image = [UIImage imageWithData:data];
_userThubmnail.image = image;