Open rnystrom opened 7 years ago
I think there's something about, deletes and reloads using the index'es of the old-dataset, whereas inserts, uses the index'es of the new-dataset.. so you might want to check up on your relevant indexes as I think this is your issue..
@PeterAntonsen this is actually a confirmed issue with UICollectionView
Sent with GitHawk
@rnystrom, fair enough, just stumbled across this, weighing in from memory as it reminded of another thread I saw.. hope it gets solved :)
Summary: When reloading a section that is displaced/shifted inside
-[UICollectionView performBatchUpdates:completion:]
, it is possible to hit anNSInternalInconsistencyException
stating "attempt to perform an insert and a move to the same section (i)" when the sections used ininsertSections:
,deleteSections:
,reloadSections:
, andmoveSection:toSection:
do not intersect.For instance, a collection view who's data source is updated to reflect the following section mutations will crash:
Steps to Reproduce:
Expected Results:
Actual Results: Crash with exception:
Version: iOS 9.3.4, 8.4, and 10.0 beta 4
Configuration: iPhone 6, iPhone 6s simulator
UICollectionViewReloadDisplacement.zip