美文网首页
iOS 10 Bug:UICollectionView 自定义布

iOS 10 Bug:UICollectionView 自定义布

作者: 々莫等闲々 | 来源:发表于2021-04-27 15:14 被阅读0次

iOS 10 bug: UICollectionView received layout attributes for a cell with an index path that does not exist

Running my app in a device with iOS 10 I get this error:

UICollectionView received layout attributes for a cell with an index path that does not exist

In iOS 8 and 9 works fine. I have been researching and I have found that is something related to invalidate the collection view layout. I tried to implement that solution with no success, so I would like to ask for direct help. This is my hierarchy view:

->Table view

    ->Each cell of table is a custom collection view [GitHub Repo][1]

        ->Each item of collection view has another collection view

What I have tried is to insert

    [self.collectionView.collectionViewLayout invalidateLayout];

In the

- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView

of both collection views. 

相关文章

网友评论

      本文标题:iOS 10 Bug:UICollectionView 自定义布

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