iOS 10/UICollectionView:未捕获异常:索引路径上的补充项的布局属性从更改为

swa*_*ner 15 uicollectionview ios10

滚动浏览UICollectionView时我的应用程序崩溃,但仅在iOS 10下:

Uncaught exception: layout attributes for supplementary item at index path
(<NSIndexPath: 0xc000000000000116> {length = 2, path = 1 - 0})
changed from <UICollectionViewLayoutAttributes: 0x6080001ec400>
index path: (<NSIndexPath: 0xc000000000000116> {length = 2, path = 1 - 0});
element kind: (UICollectionElementKindSectionHeader); frame = (0 8995; 414 180);
zIndex = 1024;  to <UICollectionViewLayoutAttributes: 0x6080001e8200>
index path: (<NSIndexPath: 0xc000000000000116> {length = 2, path = 1 - 0});
element kind: (UICollectionElementKindSectionHeader);
frame = (0 8994; 414 180); zIndex = 1024;  without invalidating the layout
Run Code Online (Sandbox Code Playgroud)

我可以在停用预取时修复此问题:

if ([self.collectionView respondsToSelector:@selector(setPrefetchingEnabled:)]) {
     self.collectionView.prefetchingEnabled = false;
}
Run Code Online (Sandbox Code Playgroud)

但似乎这是iOS 10的一个简洁功能,所以我想避免这种情况.我在SO上寻找类似的问题,但不幸的是,他们并没有帮助我,尽管这个答案看起来很有希望......