Velmurugan
Velmurugan

Reputation: 2303

Loading Images issue in UITableViewCell

I get images 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?

Upvotes: 1

Views: 200

Answers (1)

Joseph Tura
Joseph Tura

Reputation: 6360

Take a look at Apple's LazyTableImages example.

Upvotes: 2

Related Questions