1

UICollectionView滚动后刷新数据并更改单元格的位置。我怎样才能阻止它?我不想cellForItemAtIndexPath在每次滚动时都调用?

我没有太多数据。

- (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    CCell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath];

        cell.logo.image=[UIImage imageNamed:[NSString stringWithFormat:@"%@.jpg",news[indexPath.row]]];

    return cell;
}
4

0 回答 0