HI,
I am parsing an xml and getting url of image from that xml.
Now I want to display that image from url.
This is my code
- (void)setHome

Home *)newHome
{
[newHome retain];
[_home release];
_home = newHome;
self.bedsLabel.text = newHome.details ;
self.cszLabel.text = newHome.csz;
self.addressLabel.text = newHome.address;
self.price.text = newHome.price;
self.propImageView.image = [self imageFromURL:newHome.picture];
[self setNeedsDisplay];
}
- (UIImage *)imageFromURL

NSString *)url {
//NSString *temp = @"http://imgprd.nrtwebservices.com/California/properties/JPG_Main_White/222/7321C37C-80B4-43FD-B4E3-A01AF52B7222_9.jpg";
//The above code which is commented works fine for me when I give direct Image URL
NSString *temp = url;//But when I try this this doesnt work.
NSURL *url1 = [NSURL URLWithString:temp];
NSData *data = [NSData dataWithContentsOfURL:url1];
UIImage *propImage = [[UIImage alloc] initWithData:data cache:NO];
return propImage;
}
Any Idea what is going on?
If anybody can help me plz.
Thanks.