Save changes to Persistent Storage after TableView's cell reordering

Hello, guys
If I want to reorder cells in UITableView and then retrieve them using Core Data in this "reordered" state, I need to add an Index attribute to my cell's data entity, which I will change after reordering?

Accepted Reply

I've found a solution on my own.
You simply need to make your to-many relationship type NSOrderedSet and then use its methods like removeFrom or insertInto, where you can use sourceIndexPath and destinationIndexPath.

Replies

I've found a solution on my own.
You simply need to make your to-many relationship type NSOrderedSet and then use its methods like removeFrom or insertInto, where you can use sourceIndexPath and destinationIndexPath.