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")
}

Required

  • 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, including lazy and weak properties.
    See more

    Declaration

    Swift

    public final class Required<V> : AttributeKeyPathStringConvertible, AttributeProtocol where V : NSCoding, V : NSCopying

Optional

  • 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, including lazy and weak properties.
    See more

    Declaration

    Swift

    public final class Optional<V> : AttributeKeyPathStringConvertible, AttributeProtocol where V : NSCoding, V : NSCopying