79.UICollection

2017-12-25  本文已影响0人  rebeccaBull

刷新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)


上一篇 下一篇

猜你喜欢

热点阅读