开发者

Tab Bar Application, ManagedObjectContext

开发者 https://www.devze.com 2023-01-22 08:34 出处:网络
I have this tab bar application, I have 1 tab setup correctly with a drill down navigation/table view controller which display information and details of Entity A ;And now I want to create a new tab w

I have this tab bar application, I have 1 tab setup correctly with a drill down navigation/table view controller which display information and details of Entity A ; And now I want to create a new tab w开发者_运维百科hich display another set of drill down and displaying information of Entity B which both entity has no relations.

I tried to use the same code as Entity A Nav/TableViewController, and I got an error and crash

reason: '+entityForName: could not locate an NSManagedObjectModel for entity name 'EntityB''

I use the example in RecipesApps and have this in the app delegate

entityAListController.managedObjectContext = self.managedObjectContext; 

I am a newbie and I am sure something needs to fix for the managedObjectContext, please point me to the right direction, possibly with example and where the code should belong.

Greatly appreciated~


Does your xcdatamodel contain EntityB ?

0

精彩评论

暂无评论...
验证码 换一张
取 消