开发者

Universal iPhone/iPad appDelegates

When creating a new project (universal iPhone/iPad) using Core Da开发者_运维知识库ta, there's the usual appDelegate which creates the ManagedObject Model/Context etc., then there are the two subclasses of the appDelegate (one for each device). I can't seem to call the moc from the subclasses (using [super managedObjectContext]). Could someone enlighten me as to what I'm doing wrong? Something to do with initializing the common appDelegate perhaps? Billy


You should be able to use the managedObjectContext, managedObjectModel, and persistentStoreCoordinator instances from the subclasses if you access them as properties (since the property definitions are exposed in the superclass’ header):

self.managedObjectContext;
self.managedObjectModel
self.persistentStoreCoordinator
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜