Load image from server on a UIImageView in phone
Posted
by
Pedro Narvaez
on Stack Overflow
See other posts from Stack Overflow
or by Pedro Narvaez
Published on 2010-11-29T19:51:48Z
Indexed on
2011/02/27
23:24 UTC
Read the original article
Hit count: 228
Hi.. I'm having a problem loading a remote image into a UIImageVIew... It just doesn't show the image, may be i'm missing something...
I also use the described here but with the same results How to load image from remote server on the UIImageView in iphone?
Can someone help me?
This is the code i'm using
Im getting the data from a xml and on the image element I have the full path
[[detailViewController detailImage] setImage:[UIImage imageWithData: [NSData dataWithContentsOfURL: [NSURL URLWithString: [NSString stringWithFormat:@"%@", [[promoList objectAtIndex: promoIndex] objectForKey: @"image"]] ]]] ];
With this code the image are displayed correctly
[[detailViewController detailImage] setImage:[UIImage imageWithData: [NSData dataWithContentsOfURL: [NSURL URLWithString: @"http://localhost/promos/preview/1.jpeg"]] ]];
© Stack Overflow or respective owner