Ios 为什么UICollectionView在滚动后刷新数据?
UICollectionView在滚动后刷新数据并更改单元格的位置。我怎样才能阻止它?我不想每次滚动都调用cellForItemAtIndexPath 我没有太多的数据Ios 为什么UICollectionView在滚动后刷新数据?,ios,uicollectionview,uicollectionviewcell,Ios,Uicollectionview,Uicollectionviewcell,UICollectionView在滚动后刷新数据并更改单元格的位置。我怎样才能阻止它?我不想每次滚动都调用cellForItemAtIndexPath 我没有太多的数据 - (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath { CCell *cell = [cv dequeueReusableCellWithReuseI
- (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;
}
你说改变细胞的位置是什么意思?我在细胞内有图像。图像在每次滚动时都会发生变化。能否显示您的单元格ForItemAtIndexPath:?能否显示自定义单元格的.h.m文件的代码?