Open AndrewBennet opened 8 years ago
Another change! It seems that changes to the order of objects in fetchedResultsController.sections?[sourceIndexPath.section]?.objects
is not preserved. So if you perform multiple move operations, the new sort indexes will be calculated based on the original positions of the objects.
I.e. swap the top two rows, and then swap them back. At this point, the sort indexes of the managed objects do not match that of the table rows!
If you refetch after saving the managed object context, the ordering of the objects within fetchedResultsController.sections?[sourceIndexPath.section]?.objects
is updated, and so subsequent moves are handled correctly.
Hey there, sorry it's taken so long to get back to you – thanks again for the PR, I'm going to review and make changes this weekend 🙇
No worries - it's not a big deal :) Cheers!
There are some weird UI glitches which occur currently - see this screen recording. Additionally, the userReordingCells boolean is not being used correctly. Things work much better if the fetchedresultscontroller delegate is disabled whilst rows are being moved.