iphone-webservice-image -
i want display image in uitableviewcell, in uitableview data fetch webservice , use xmlparsing i.e.
-(void)parser:(nsxmlparser *)parser didstartelement:(nsstring *)elementname namespaceuri:(nsstring *)namespaceuri qualifiedname:(nsstring *)qname attributes:(nsdictionary *)attributedict{ } -(void)parser:(nsxmlparser *)parser foundcharacters:(nsstring *)string { } -(void)parser:(nsxmlparser *)parser didendelement:(nsstring *)elementname namespaceuri:(nsstring *)namespaceuri qualifiedname:(nsstring *)qname { }
now , if xml ouput return image path name,,
like hhtp://www.abc.com/a.png
then uitableviewcell can display image ?
if not how can display image...
nsdata *data = [[nsdata alloc] initwithcontentsofurl:[nsurl urlwithstring:@"http://www.abc.com/a.png"]]; uiimage *img = [[uiimage alloc] initwithdata:data]; cell.imageview.image = img; [img release]; [data release];
Comments
Post a Comment