Hi, I know there are other questions covering this topic, but none seem to fit exactly what I'm experiencing, hence the new question.
I have an app which is a UITabBarController, I have defined two subviews
Both tabs have their Class attribute in the Identity Inspector set to UINavigationController.
Both subviews are Class UIViewController and contain MKMapView objects.
I am trying to integrate Core Data with the objective being that I can use Core Data to store information about object I want to place on the map.
I have my UITabBarController defined as 'rootController' in my Delegate header file. I also have the managedObjectModel, managedObjectContext and persistentStoreCoordinator properties defined there.
In the Delegate implementation I have the standard accessor methods for the above properties and I have rootController defined as follows:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[window addSubview:rootController.view];
[window makeKeyAndVisible];
}
In my view controllers for the child views, I have defined my managedObjectContext and synthesized it.
Now for my problem, I cannot get the compiler to allow me to reference the managedObjectContext in the App Delegate from the View Controllers.
I tried the following in the applicationDidFinishLaunching method:
firstView.managedObjectContext = self.managedObjectContext;
But I just get the following error:
Accessing unknown 'setManagedObjectContext:' class method
Can anyone help me figure this out?
Thanks
Update:
To add to my question, I'll head off some answers by providing more detail
I have an @Class declaration in my appdelegate.h file I have a #import statement in my appdelegate.m file for the firstView.h file I have declared my firstView as follows in my appdelegate.h file
FirstView *firstView;