As my application is more of a scratch pad rather than something that was designed I'm now looking at added Core Data support.
Instead of try to plumb it straight in I created a new project (this time checking the use core data option) to see the 'default' code thats generated.
Doing some quick reading I'm fine with creating the model and then entity side of things. And to some degree I understand the Managed Object Context.
However, what I don't get at this stage is that the MoC etc is created in the App Delegate. My app is using storyboarding, so I have dropped a TableViewController on it and embedded it a Navigation Controller. This TableViewController is linked to a subclass of UITableViewController I create.
So my storyboard looks like:
->Nav Controller->TVC
The generated code created and setup the MoC in the AppDelegate, so how do I access it in my TVC?
Does it have to be passed along to my TVC (how??) or is it used like a global variable?
If I add another view to my storyboard e.g.:
->Nav Controller->TVC->ViewController
does it have to be pushed down the chain (again how??) or as before is it used like a global variable?
Instead of try to plumb it straight in I created a new project (this time checking the use core data option) to see the 'default' code thats generated.
Doing some quick reading I'm fine with creating the model and then entity side of things. And to some degree I understand the Managed Object Context.
However, what I don't get at this stage is that the MoC etc is created in the App Delegate. My app is using storyboarding, so I have dropped a TableViewController on it and embedded it a Navigation Controller. This TableViewController is linked to a subclass of UITableViewController I create.
So my storyboard looks like:
->Nav Controller->TVC
The generated code created and setup the MoC in the AppDelegate, so how do I access it in my TVC?
Does it have to be passed along to my TVC (how??) or is it used like a global variable?
If I add another view to my storyboard e.g.:
->Nav Controller->TVC->ViewController
does it have to be pushed down the chain (again how??) or as before is it used like a global variable?