ValueContainer
public enum ValueContainer<O> where O : CoreStoreObject
The containing type for value properties. Use the DynamicObject.Value 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 required value properties. Any type that conforms to
ImportableAttributeTypeare supported.class Animal: CoreStoreObject { let species = Value.Required<String>("species", initial: "") let nickname = Value.Optional<String>("nickname") let color = Transformable.Optional<UIColor>("color") }See moreImportant
Value.Requiredproperties are required to be stored properties. Computed properties will be ignored, includinglazyandweakproperties.Declaration
Swift
public final class Required<V> : AttributeKeyPathStringConvertible, AttributeProtocol where V : ImportableAttributeType
-
The containing type for optional value properties. Any type that conforms to
ImportableAttributeTypeare supported.class Animal: CoreStoreObject { let species = Value.Required<String>("species", initial: "") let nickname = Value.Optional<String>("nickname") let color = Transformable.Optional<UIColor>("color") }See moreImportant
Value.Optionalproperties are required to be stored properties. Computed properties will be ignored, includinglazyandweakproperties.Declaration
Swift
public final class Optional<V> : AttributeKeyPathStringConvertible, AttributeProtocol where V : ImportableAttributeType
View on GitHub
ValueContainer Enumeration Reference