Reputation: 1824
I am fetching image from server and save it on a NSMutableArray
. The result of array like that
myarray={"roger_50.jpg",....};
Now i dont know how to access this image on table view.
Upvotes: 0
Views: 240
Reputation: 3515
Just have proper URL for image in array. And pass it to NSURL object as a link.
NSURL *imageURL = [NSURL URLWithString:[myarray objectAtIndex : yourindex]];
NSData *data = [NSData dataWithContentsOfURL:imageURL];
UIImage *image = [[UIImage alloc] initWithData:data];
Have a nice coding. Stay Hungry, Stay Foolish...
Upvotes: 1
Reputation: 2377
i hope the thing you are getting from array are only the names you can retrieve images from server in only two ways i) in nsdata ii)by url of the images on sever .By this way you cann't access the images.
Upvotes: 0