ios - Image data Shows nil while retrieving image from JSON Array in objective c -
i new in ios. , trying load images custom uitableviewcell
unfortunately not getting desired results.
in didfinishlaunching
method
imagearray=[[nsmutablearray alloc] init]; imagearray=[responsedict valueforkey:@"empimg"]; nslog(@"image array =%@",imagearray);
table view cellforrowatindexpath
method
- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *sti=@"sti"; newjoineecell *cell = (newjoineecell *)[tableview dequeuereusableheaderfooterviewwithidentifier:sti]; if (cell == nil) { nsarray *nib = [[nsbundle mainbundle] loadnibnamed:@"newjoineecell" owner:self options:nil]; cell = [nib objectatindex:0]; cell.accessorytype=uitableviewcellaccessorynone; } nsdata *imagedata=[[nsdata alloc]initwithcontentsofurl:[nsurl urlwithstring:[imagearray objectatindex:indexpath.row]] ]; uiimage *image11=[[uiimage alloc]initwithdata:imagedata]; cell.propic.image=image11; return cell; }
by debugging imagedata shows nil value while imagearray contain 13 objects
"http://url/uploadedfiles/mksfdf.png"
Comments
Post a Comment