Differ
Differ copied to clipboard
Fix crash moving rows & sections
I noticed that sometimes UITableView asserts failure when applying diff with moveRows & moveSections. It's reproducible in the TableViewExample project with some modification to the example data.
So far separating moves into deletions & insertions can resolve this issue, though I have not inspected the diff logic. This PR includes a patch for UITableView.
2018-01-23 12:35:51.464473+0900 TableViewExample[16749:1512966] *** Assertion failure in -[_UITableViewUpdateSupport _setupAnimationsForNewlyInsertedCells], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3698.33.7/UITableViewSupport.m:1295
2018-01-23 12:35:51.465157+0900 TableViewExample[16749:1512966] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempt to create two animations for cell'