I have a tableView with some large images in it. I'm struggling to improve the very jerky scrolling performance. If I use ImageNamed to load the images, scrolling is jerky at first, but after the images are viewed, scrolling is smooth. I know ImageNamed adds the images into the system cache, so my question is: is it possible to pre-load the images into the system cache before they are viewed?
I've tried by adding the following code to my viewDidLoad method:
for (int i = 0; i < appDelegate.detailSectionsDelegateDict.count; i++) {
NSString *imageString = [NSString stringWithFormat:@"%@",[[appDelegate.detailSectionsDelegateDict objectAtIndex:i] objectForKey:@"MainTrackImage"]];
NSString *bundlePath = [[NSBundle mainBundle] bundlePath];
UIImage* theImage;
theImage = [UIImage imageNamed:imageString];
[imageCacheArray insertObject:theImage atIndex:i];
}
I then draw the correct image from the imageCacheArray in my CellForRowAtIndexPath method. But the result is still jerky scrolling.
Thanks!