UICollectionView crash on unhighlightAllItems

前端 未结 4 1062
别那么骄傲
别那么骄傲 2021-02-09 01:26

I\'ve gotten several crash reports related to a UICollectionView in iOS 7. I\'m not able to consistently recreate this crash.

Exception Type:  SIGSEGV
Exception         


        
4条回答
  •  一生所求
    2021-02-09 01:40

    I also had this crash in _unhighlightAllItems in a collection view where I used a long press recognizer that changes the state of cells (but not their number) and then called [collectionView reloadData]. In my case, the solution from @toostn (using performBatchUpdates) works great.

    I also found that using reloadItemsAtIndexPaths: instead of reloadData also avoids the crash.

提交回复
热议问题