美文网首页
79.UICollection

79.UICollection

作者: rebeccaBull | 来源:发表于2017-12-25 21:08 被阅读0次

刷新UICollectionView:
[self.collectionView reloadItemsAtIndexPaths:@[indexPath]];

reloadItemsAtIndexPath默认会有一个动画的过程,cell内容更新的瞬间会出现原内容与新内容重叠的情况。那么使用如下方式取消该动画即可:

[UIView performWithoutAnimation:^{
    [self.collectionView reloadItemsAtIndexPaths:@[indexPath]];
}];

UIcollectionview  显示超过屏幕时,上下滚动之后,数据出现重复和错乱现象--解决办法:

![image.png](https://img.haomeiwen.com/i3739252/7e7c89b77c2ee4aa.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)


相关文章

  • 79.UICollection

    刷新UICollectionView:[self.collectionView reloadItemsAtInde...

网友评论

      本文标题:79.UICollection

      本文链接:https://www.haomeiwen.com/subject/dcsrgxtx.html