Ios: Saving / update more than one records at the same time with core data
I have a similar question with This. Basically, is there a way to save 开发者_Go百科/ update multiple records from the table view at once with core data?
All you really need to do is record which rows are checked and then alter the corresponding managed object appropriately.
A check mark is an accessory view so you would put the code to record which rows are checked (or save right then) in tableView:accessoryButtonTappedForRowWithIndexPath:
If you are using NSFetchedResults controller, you can just save the index path object in an array and it will record which managed object in the controllers fetchedObjects
that you need to save/update because its table row got checked.
精彩评论