I am trying to load image from a JSON feed into a tableview. The code below returns the images but it is making the app very very slow and “sticky”. Any ideas on how to make it faster? This is being called for each cell in the tableview.
NSURL *imageURL = [NSURL URLWithString:@"http://www.site.com/images/image_1.jpg"];
NSData *imageData = [NSData dataWithContentsOfURL:imageURL];
UIImage *cellImage = [UIImage imageWithData:imageData];
Thank you all!
Loading of images from the Internet in main thread is always bad idea.
You need to subclass
UITableViewCelland do loading of images in background thread.Here you have few suggestions how to do it.
Lazy load images in UITableView
Load image to a tableView from URL iphone sdk