indragie
indragie

Reputation: 18122

Core Data: editing object from detail view

I'm just starting out with Core Data and I have an iPhone Core Data project set up in a master-detail view system. The master view contains items, and the detail view lets you edit the properties of the selected item.

I'm looking for the best options in order to implement the editing. Would I pass along the NSManagedObjectContext to the detail view controller to make modifications and save changes, or would that even work? Is there any example code that demonstrates how to do this?

Upvotes: 4

Views: 2586

Answers (1)

Don
Don

Reputation: 3684

I've done that before, pass the NSManagedObjectContext when pushing the detail view. I've also passed the object to the detail view and had the master view in control of saving, but that was for some quirk of workflow for that app.

Apple has some great sample code, like iPhoneCoreDataRecipes.

Upvotes: 3

Related Questions