Properties and Binding
-
Represents a property, which exposes a value and allows observers to see when that value has changed.
See moreDeclaration
Swift
public protocol ReadablePropertyType : AnyObject -
A concrete property that is readable and observable.
See moreDeclaration
Swift
open class ReadableProperty<T> : ReadablePropertyType -
A concrete property that can be updated when bound to another property.
See moreDeclaration
Swift
open class BindableProperty<T> -
A concrete property that can be updated, but not read from.
See moreDeclaration
Swift
open class WriteOnlyProperty<T> : BindableProperty<T> -
Base class for properties that can be both read from and written to, i.e. is capable of bidirectional binding.
See moreDeclaration
Swift
open class ReadWriteProperty<T> : BindableProperty<T>, ReadablePropertyType -
A concrete read/write property whose value can be mutated directly.
See moreDeclaration
Swift
public final class MutableValueProperty<T> : ReadWriteProperty<T> -
A read/write property whose storage is maintained external to the property. This is mainly useful for compatibility with existing UI frameworks. For example, an ExternalValueProperty may be used to add binding support to an existing AppKit control, such as the
See morestringValueproperty of NSTextField.Declaration
Swift
public final class ExternalValueProperty<T> : ReadWriteProperty<T> -
A convenience form of WriteOnlyProperty that allows a given function to be called whenever a new value is delivered through a binding. This allows for use of the
See more~~>operator that allows for setting up a binding between a UI control that producesmomentary
events (e.g. UIButton clicks) and an ActionProperty that wraps an event handler.Declaration
Swift
public class ActionProperty<T> : WriteOnlyProperty<T> -
A handle to a binding that is established by one of the
See morebindorconnectmethods.Declaration
Swift
public class Binding -
Describes the result of a
See moreconnectBiditransformation.Declaration
Swift
public enum ChangeResult<T> -
Establishes a unidirectional binding between
lhsandrhs. When the value of the synchronousrhsproperty changes, the value oflhswill be updated.Declaration
Swift
@discardableResult public func <~ <T, RHS>(lhs: BindableProperty<T>, rhs: RHS) -> Binding where T == RHS.Value, RHS : ReadablePropertyType -
Establishes a unidirectional binding between
lhsandrhs. When the value of the asynchronousrhsproperty changes, the value oflhswill be updated.Declaration
Swift
@discardableResult public func <~ <T, RHS>(lhs: BindableProperty<T>, rhs: RHS) -> Binding where T == RHS.SignalChange, RHS : AsyncReadablePropertyType, RHS.SignalChange == RHS.Value -
Establishes a bidirectional binding between the two properties. When one property’s value changes, the other property’s value will be updated and vice versa. Note that using this operator will cause the
lhsproperty to take on the therhsproperty’s value immedately.Declaration
Swift
@discardableResult public func <~> <T>(lhs: ReadWriteProperty<T>, rhs: ReadWriteProperty<T>) -> Binding -
Establishes a bidirectional binding between the two properties. When one property’s value changes, the other property’s value will be updated and vice versa. Note that using this operator will cause the
lhsproperty to take on the therhsproperty’s value immedately (if the value is defined).Declaration
Swift
@discardableResult public func <~> <T>(lhs: ReadWriteProperty<T>, rhs: AsyncReadWriteProperty<T>) -> Binding -
Establishes a unidirectional binding such that
rhsis poked wheneverlhsdelivers a new value.Declaration
Swift
@discardableResult public func ~~> <T>(lhs: Signal<T>, rhs: ActionProperty<T>) -> Binding
-
Undocumented
See moreDeclaration
Swift
public protocol AsyncPropertyType -
Undocumented
See moreDeclaration
Swift
public protocol AsyncReadablePropertyType : AnyObject, AsyncPropertyType -
A concrete readable property whose value is fetched asynchronously.
See moreDeclaration
Swift
open class AsyncReadableProperty<T> : AsyncReadablePropertyType -
A concrete readable property whose value can be updated and fetched asynchronously.
Declaration
Swift
open class AsyncReadWriteProperty<T> : AsyncReadableProperty<T>
-
Works in conjunction with will-change and did-change notifications that are delivered to a UI control when an associated Property’s underlying value is changing asynchronously.
See moreDeclaration
Swift
public class ChangeHandler
Properties and Binding Reference