tags:

views:

57

answers:

3

How to create UIImageView with image from a link like this http://img.abc.com/noPhoto4530.gif? Anybody can help me? :(

+1  A: 

Download image to a local path on your device then get a UIImage from imageWithContentsOfFile and use this to set the image in the UIImageView. Remember to cleanup your image file sometime.

No one in particular
A: 

You can either do as described here, or you can use NSURLConnection to download the image data and create the UIImage to set to you UIImageView. I personally prefer using NSURLConnection to download the image asynchronously.

imaginaryboy
+1  A: 
NSURL *url = [NSURL URLWithString:@"http://img.abc.com/noPhoto4530.gif"];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *image = [UIImage imageWithData:data];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
nszombie
Thanks for your help :)
leduchuy89vn