iphone - Getting started with Core Data -


I have a problem understanding how the core data works and the code is in context.

I get a coordinator and a reference. I also get that state management how do they work together?

I do not understand how I can store as an object, I can say, an image and some strings.

Suppose I want to retrieve the image and string what should I do next?

Where can I save my state? how?

How does my code look like? I really appreciate the code sample of a bare bone, because I'm really confused.

These are some of the best tutorials I've found:

  • For your questions:

    I think a coordinator and The context is. I also get the state management how do they work together?

    The constant store coordinator is the place that your data is actually stored, which is a SQLlite DB or XML file or whatever the coordinator is an intangible, so you need to worry What kind of storage is there in the backend?

    The managed object context is that you continuously interact with the Store Coordinator. Think of it as your scratch pad With managed object contexts, you can create and modify managed objects.

    I do not understand how I can store as an object, I can say, an image and some strings assume that I will retrieve the image and string later Want to What should I do?

    If you look at some of the above tutorials, you will see how to drag the object from the managed object project. An NSString will be stored on a managed object as a string attribute, such as:

      [managedObject setValue: @ "TestString" for: @ "some stringproperty"];  

    I am not sure about images because I have never stored any image in core data. I know that anything that can be serialized can be stored as a variable feature.

    Where can I save my kingdom? how?

    You simply call the 'Save' method on your managed object context. Like:

      [Save the reference: & amp; Error]  

    Comments

    Popular posts from this blog

    c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

    Calling GetGUIThreadInfo from Outlook VBA -

    Obfuscating Python code? -