First, let's take a look at the TableView method for getting the cell instance.
-(UITableViewCell *) tableView :( UITableView *) tableView cellForRowAtIndexPath :( NSIndexPath *) indexPath
Code involving Cell instantiation:
PostCell *cell = (PostCell * (! NSArray *objects = [[NSBundle mainBundle] loadNibNamed: (NSObject *o ([o isKindOfClass:[PostCell = (PostCell **singleTap = cell.img.image = [UIImage imageNamed:*p = ([cell.img.gestureRecognizers count] > *tap = (UITap *)[cell.img.gestureRecognizers objectAtIndex: tap.tag == self.catalog <= ? : == [UIFont boldSystemFontOfSize:= [NSString stringWithFormat:= [NSString stringWithFormat: cell.img.image = ([p.img isEqualToString:= [UIImage imageNamed: NSData * imageData === IconDownloader *downloader = [imageDownloadsInProgress objectForKey:[NSString stringWithFormat: (downloader == ImgRecord *record = [ImgRecord = cell;
Next, the implementation in startIconDownload: forIndexPath: Is to do the following:
1. instantiate IconDownloader and set it to imageDownloadsInProgress
2. iconDownloader instances use
NSURLConnection *conn =:self];
Asynchronous request
3. When the conn execution is complete, execute its delegate-IconDownloader finish method and cache the image
4. In the finish method, call delegate-PostView to render ImageData to image (png) data through UIImagePNGRepresentation, and call [tablePosts reloadData]
Here, it is worth noting: Is the reloadData method called once after each image is loaded optimal?