我正在使用UICollectioView来显示图像列表。图像存储在项目内部。问题是滚动两到三次后会显示图像。我的问题与this相同。但它没有解决问题。
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
static NSString *identifier = @"Cell";
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:indexPath];
UIImageView *recipeImageView = (UIImageView *)[cell viewWithTag:100];
recipeImageView.image = [UIImage imageNamed:[arr objectAtIndex:indexPath.row]];
return cell;
}