当请求数据成功时,我重新加载部分。方法是:
[self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:1]];
或
NSIndexPath *idx = [NSIndexPath indexPathForItem:0 inSection:1];
[self.collectionView reloadItemsAtIndexPaths:@[idx]];
这是控制台输出:
[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.30.14/UICollectionView.m:4324
这个问题是偶尔出现的!
提前致谢!
最佳答案
我遇到了同样的问题。当其他部分的项目计数发生更改,但您仅重新加载已更改的部分之一时,就会发生这种情况。
关于ios - UICollectionView 重新加载某些部分崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35790658/