FSPagerView icon indicating copy to clipboard operation
FSPagerView copied to clipboard

偶尔会崩溃 UICollectionView received layout attributes for a cell with an index path that does not exist:

Open karosLi opened this issue 5 years ago • 1 comments

NSInternalInconsistencyException UICollectionView received layout attributes for a cell with an index path that does not exist: <NSIndexPath: 0xb67753b476ac2ecc> {length = 2, path = 5459 - 1}

karosLi avatar Mar 28 '19 05:03 karosLi

refer http://www.cocoachina.com/articles/28804, add [self.collectionViewLayout forceInvalidate]; as following

  • (void)reloadData { self.collectionViewLayout.needsReprepare = YES; [self.collectionView reloadData]; [self.collectionViewLayout forceInvalidate]; }

hope it works.

bugbuka avatar Dec 29 '20 02:12 bugbuka