I working on xml parsing…..
its parsed data success fully . i need to display title,date,time and picture.
it worked on title,date,time,
Now i need to display picture…
for picture its getting some url…..
aEventInfo.event_Picture=http://static.djguide.nl/image/flyers/2010/120/91426front.jpg
NSURL *url3 = [NSURL URLWithString:aEventInfo.event_Picture];
NSData *data = [NSData dataWithContentsOfURL:url3];
NSLog(@"%@data",data);
UIImage *imageView =[[UIImage alloc] initWithData:data];
CGSize size;
size.width=400;
size.height=400;
UIImage *scaledImage = [imageView scaleToSize:size];
cell.imageView.image=scaledImage;
I did like this its crashing… if i got image url.
If aEventInfo.event_picture=nil.
Its not crashing.
if any value in aEventInfo.event_picture ..
example
http://static.djguide.nl/image/flyers/2010/120/91426front.jpg
My app get crashed.
I dont know how to do..
can any one advice me
and help me out in this case.
@thanks in advance.
You should use the connection methods. for example, connectionDidReceive, ConnectionDidFinish. You should first create request and make a connection using connection Object. And after that writedown connection Methods.