TransformableContainer
public enum TransformableContainer<O> where O : CoreStoreObject
The containing type for transformable properties. Use the DynamicObject.Transformable
typealias instead for shorter syntax.
class Animal: CoreStoreObject {
let species = Value.Required<String>("species", initial: "")
let nickname = Value.Optional<String>("nickname")
let color = Transformable.Optional<UIColor>("color")
}
-
The containing type for transformable properties. Any type that conforms to
NSCoding & NSCopying
are supported.class Animal: CoreStoreObject { let species = Value.Required<String>("species", initial: "") let nickname = Value.Optional<String>("nickname") let color = Transformable.Optional<UIColor>("color") }
Important
Transformable.Required
properties are required to be stored properties. Computed properties will be ignored, includinglazy
andweak
properties.Declaration
Swift
public final class Required<V> : AttributeKeyPathStringConvertible, AttributeProtocol where V : NSCoding, V : NSCopying
-
The containing type for optional transformable properties. Any type that conforms to
NSCoding & NSCopying
are supported.class Animal: CoreStoreObject { let species = Value.Required<String>("species", initial: "") let nickname = Value.Optional<String>("nickname") let color = Transformable.Optional<UIColor>("color") }
Important
Transformable.Optional
properties are required to be stored properties. Computed properties will be ignored, includinglazy
andweak
properties.Declaration
Swift
public final class Optional<V> : AttributeKeyPathStringConvertible, AttributeProtocol where V : NSCoding, V : NSCopying