RealmOptional
public final class RealmOptional<Value: RealmOptionalType>: RLMOptionalBase
A RealmOptional instance represents an optional value for types that can’t be
directly declared as @objc in Swift, such as Int, Float, Double, and Bool.
To change the underlying value stored by a RealmOptional instance, mutate the instance’s value property.
-
The value the optional represents.
Declaration
Swift
public var value: Value? -
Creates a
RealmOptionalinstance encapsulating the given default value.Declaration
Swift
public init(_ value: Value? = nil)Parameters
valueThe value to store in the optional, or
nilif not specified.
View on GitHub
Install in Dash
RealmOptional Class Reference