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

Posted Sico2Sico

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了UICollectionView received layout attributes for a cell with an index path that does not exist相关的知识,希望对你有一定的参考价值。

Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘UICollectionView received layout attributes for a cell with an index path that does not exist: <NSIndexPath: 0x28223ea40> length = 2, path = 0 - 1’

open func insertItems(at indexPaths: [IndexPath])

需要注意的是在插入insertItems 之前 不能再改变UICollectionViewFlowLayout
的布局 如果需要更改UICollectionViewFlowLayout的布局
需要在执行insertItems函数后 才可以调用 UICollectionViewFlowLayout的prepare 或者 invalidateLayout

以上是关于UICollectionView received layout attributes for a cell with an index path that does not exist的主要内容,如果未能解决你的问题,请参考以下文章

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

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

C# socket receive方法

Receive_SMS 权限问题

Android receiver

使用Receiver接收告警信息