Basic data: editing an object from a detailed view

I'm just starting out with Core Data, and I have an iPhone Core Data project created in the main parts viewer. The main view contains elements, and the detailed view allows you to edit the properties of the selected element.

I am looking for the best options for implementing editing. Can I pass NSManagedObjectContext to the detail view controller to make changes and save the changes, or will it work? Is there an example code that demonstrates how to do this?

+4
source share
1 answer

I have done this before, passing NSManagedObjectContext when I click the detail view. I also passed the object in a detailed view and had a basic understanding of storage management, but this was due to some quirks of the workflow for this application.

Apple has a great sample code like iPhoneCoreDataRecipes .

+3
source

Source: https://habr.com/ru/post/1302563/


All Articles