J'ai un UITableView
qui télécharge ses images UITableViewCell
depuis un serveur. J'ai observé que la table défile très lentement.UITableview avec images défilent très lentement
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"parallaxCell";
JBParallaxCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
NSURL *imageURL = [NSURL URLWithString:[[news objectAtIndex:indexPath.row]objectForKey:@"Resim"]];
NSData *imageData = [NSData dataWithContentsOfURL:imageURL];
UIImage *imageLoad = [[UIImage alloc] initWithData:imageData];
cell.titleLabel.text = [[news objectAtIndex:indexPath.row]objectForKey:@"Adi"];
cell.subtitleLabel.text = [[news objectAtIndex:indexPath.row]objectForKey:@"Resim"];
cell.parallaxImage.image = imageLoad;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
utilisez https://github.com/rs/SDWebImage pour charger vos images paresseusement. – limon