Loading Images issue in UITableViewCell
I get image开发者_JS百科s from a URL using XML Parsing. I loaded the all images from url in to UITableViewCell using Parsing. But when I press the scrollbar in UITableView, it make slowly to loading images.
I used the following code.
NSString *image1 =[images objectAtIndex:indexPath.row];
NSLog(@"Images ..... = %@",image1);
NSData *mydata = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:[images objectAtIndex:indexPath.row]]];
UIImage *myimage = [[UIImage alloc] initWithData:mydata];
UIImageView *imageView = [ [ UIImageView alloc ] initWithImage: myimage ];
imageView.frame = CGRectMake(0.0f, 00.0f, 60.0f, 63.0f);
[cell.contentView addSubview:imageView];
How can I increase the loading speed?
Take a look at Apple's LazyTableImages example.
精彩评论