public final class DynamicProperty<Value>: MutablePropertyProtocol
dynamic property, or one defined in Objective-C, using Key-Value Coding and Key-Value Observing.
Use this class only as a last resort!
MutableProperty is generally better unless KVC/KVO is required by the API you’re using (for example,
The current value of the property, as read and written using Key-Value Coding.
public var value: Value?
The lifetime of the property.
public var lifetime: Lifetime
A producer that will create a Key-Value Observer for the given object, send its initial value then all changes over time, and then complete when the observed object has deallocated.
ImportantThis only works if the object given to init() is KVO-compliant. Most UI controls are not!
public var producer: SignalProducer<Value?, NoError>
public private(set) lazy var signal: Signal<Value?, NoError> =
Initializes a property that will observe and set the given key path of the given object. The generic type
Valuecan be any Swift type, and will be bridged to Objective-C via
objectmust support weak references!
public init(object: NSObject, keyPath: String)
An object to be observed.
Key path to observe on the object.