Open killev opened 5 years ago
Sorry, the subscript operator doesn't impact. The thing is that:
collectionView.performBatchUpdates
demands dataSource to be changed inside:
If the collection view's layout is not up to date before you call this method, a reload may occur. To avoid problems, you should update your data model inside the updates block or ensure the layout is updated before you call performBatchUpdates(_:completion:).
https://developer.apple.com/documentation/uikit/uicollectionview/1618045-performbatchupdates
batchUpdate causes the crashes on both UITAbleView and UICollectionView:
the crucial thing here is array[2] = 4