iphone - Saving data from ViewControllres (Core Data) -


I have seen through the core data tutorial which puts the main data code in the appadiget class that was created to create a window project. I was already able to save and retrieve data from AdLite Class.

My question is, if I have a view controller that saves the data, then how do I save data for that specific class?

  • Do I continually redefine the store and managed object model in that class?
  • If this is the case, then what is the programmatic way to do this (already it was generated for me). I. What methods / Instantiable / Properties I need to declare? I

    can stand for any explanation

    No need to go through the app representative or redefine the store etc. All you need is in the context of managedObjectContext . Generally, this is a property (a view controller says), which you can set from outside to after creation and can easily reach within the visual controller class (much easier than going through the app representative !). You can easily pass it to other view controllers, and read with standard methods and write on core data.

    If you want to save your items, yes - you have to create your own managed object model (by modifying the template you have generated).

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -