BindableProperty

open class BindableProperty<T>

A concrete property that can be updated when bound to another property.

  • Undocumented

    Declaration

    Swift

    public typealias Setter = (T, ChangeMetadata) -> Void
  • Unbinds all existing bindings.

    Declaration

    Swift

    public func unbindAll()
  • Establishes a unidirectional binding between this property and the given property. When the other property’s value changes, this property’s value will be updated. Note that calling bind will cause this property to take on the rhs property’s value immediately, if known, otherwise it will take on initialValue if non-nil.

    Declaration

    Swift

    @discardableResult
    public func bind<RHS>(_ rhs: RHS, initialValue: T? = nil) -> Binding where T == RHS.Value, RHS : ReadablePropertyType
  • Establishes a unidirectional binding between this property and the given property. When the other property’s value changes, this property’s value will be updated. Note that calling bind will start the rhs property and will cause this property to take on the rhs property’s value immediately, if known, otherwise it will take on initialValue if non-nil.

    Declaration

    Swift

    @discardableResult
    public func bind<RHS>(_ rhs: RHS, initialValue: T? = nil) -> Binding where T == RHS.SignalChange, RHS : AsyncReadablePropertyType, RHS.SignalChange == RHS.Value