Cells rendered incorrectly when using UITableView.reload(using:, with:)
under certain contexts
#99
Closed
3 tasks done
Checklist
Given
An original list of three elements.
If the list is updated so that the...
The resulting changeset will look like...
When
I apply this
changeset
to theUITableView
withreload(using:, with:)
...Expected Behavior
The cells should animate appropriately and the cells should all be in their new positions with their updated values.
Current Behavior
Cells at index 0 and 1 are identical. Element 0 (originally 1) is not present in the UITableView.
Steps to Reproduce
I've modified the demo app in a fork to demonstrate the issue.
Detailed Description (Include Screenshots)
Please note that the "context" under which this happens is important because an identifcal changeset may not result in the same problem.
For instance, in the example code, if I rename the
HomeViewController
'scomponents
stored property todata
then the problem goes away, WTF! The naming of properties should not affect the resulting animation, this is most peculiar. Demo code.Reproducible Demo Project
https://github.com/OliverPearmain/DifferenceKit/tree/reload-with-move-bug
Environments
The text was updated successfully, but these errors were encountered: