UICollctionView 刷新 item 刷新 消失

在需要局部刷新的时候,可能出现的问题:

当时采用的局部刷新,第一次刷新没问题,当多次刷新的时候 item 就会消失

NSIndexSet *set =[[NSIndexSet alloc]initWithIndex:1];
 [collectionView reloadSections:set];

改为是要使用刷新某个具体的item,放入数组进行刷新就好了

NSIndexPath *path =[NSIndexPath indexPathForRow:1 inSection:0];
  [weakSelf.collectionView reloadItemsAtIndexPaths:@[path]];

 

posted @ 2017-08-06 00:06  会钓鱼的丶猫  阅读(349)  评论(0编辑  收藏  举报