2010-11-11 67 views
1

我使用XML解析從URL獲取圖像。我使用Parsing將所有圖像從url加載到UITableViewCell中。但是當我按下UITableView中的滾動條時,它會緩慢加載圖像。在UITableViewCell中加載圖像問題

我用下面的代碼。

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]; 

如何提高加載速度?

回答