문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top