I am using CoreData for my iPhone app, but CoreData doesn’t provide an automatic way of allowing you to reorder the records. I thought of using another column to store the order info, but using contiguous numbers for ordering index has a problem. if I am dealing with lots of data, reordering a record potentially involves updating a lot of records on the ordering info (it’s sorta like changing the order of an array element)
What’s the best way to implement an efficient ordering scheme?
FetchedResultsController and its delegate are not meant to be used for user-driven model changes. See the Apple reference doc.
Look for User-Driven Updates part. So if you look for some magical, one-line way, there’s not such, sadly.
What you need to do is make updates in this method:
and also prevent the notifications to do anything, as changes are already done by the user:
I have just implemented this in my to-do app (Quickie) and it works fine.