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
2010-08-25 03:12:27
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
2010-08-25 03:13:13
+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
2010-08-25 04:14:33
Thanks for your help :)
leduchuy89vn
2010-08-25 08:55:19