iPhone: Core Data save Class object -


I have core data in a unit called space. Inside this I have some fields, such as date However, I would like to save the category item that I called annotations.

  space (object) | __DATE __ Annotation (Mk Antenna Protocol)   
 

You have two options: < / P>

  1. If your annotation class NSCoding protocol (or if you enter NSValueTransformer For example, you can use the transformable attribute in your core data unit, for example, the core data for your annotation is automatically serialized / named to deserialize NSValueTransfor Mer .

  2. You can create a annotation unit in your core data model. You CLLocationCoordinate2D for the unit. You will probably create two support using two double s and then CLLocationCoordinate2D .

  3. The advantage of

(1) It is easy (if your class is consistent with NSCoding ). (2) The advantage of this is that you can query against the data within the unit Are Even if you are using SQLite continuously store, if you use (1), the data is opaque to SQLite query engine, so you will not be able to query it with the SQLite backend.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -