I\'m just starting out with Core Data and right now I\'m building my data model. I need a UIColor attribute for my entity, but the type dropdown for the attribute doesn\'t h
What you probably want is a transformable attribute. Give the section on "Non-standard Persistent Attributes" in the Core Data Programming Guide an other read. A transformable attribute is, underneath the covers, a binary data attribute, but Core Data will automatically use the NSValueTransformer
of your specification to serialize and unserialize the logical attribute value for you. For values that are NSCoding
compliant, the NSKeyedUnarchiveFromDataTransformerName
(which is the default transformer) will do the trick.
Of course, Core Data cannot index or, for an SQLite backend, query against this transformable value.