BindingTargetProvider
public protocol BindingTargetProvider
Describes an entity which be bond towards.
-
<~(_:_:)Extension methodBinds a source to a target, updating the target’s value to the latest value sent by the source.
Note
The binding will automatically terminate when the target is deinitialized, or when the source sends acompletedevent.let property = MutableProperty(0) let signal = Signal({ /* do some work after some time */ }) property <~ signallet property = MutableProperty(0) let signal = Signal({ /* do some work after some time */ }) let disposable = property <~ signal ... // Terminates binding before property dealloc or signal's // `completed` event. disposable.dispose()Declaration
Swift
@discardableResult public static func <~ <Source: BindingSource> (provider: Self, source: Source) -> Disposable? where Source.Value == ValueParameters
targetA target to be bond to.
sourceA source to bind.
Return Value
A disposable that can be used to terminate binding before the deinitialization of the target or the source’s
completedevent. -
<~(_:_:)Extension methodBinds a source to a target, updating the target’s value to the latest value sent by the source.
Note
The binding will automatically terminate when the target is deinitialized, or when the source sends acompletedevent.let property = MutableProperty(0) let signal = Signal({ /* do some work after some time */ }) property <~ signallet property = MutableProperty(0) let signal = Signal({ /* do some work after some time */ }) let disposable = property <~ signal ... // Terminates binding before property dealloc or signal's // `completed` event. disposable.dispose()Declaration
Swift
@discardableResult public static func <~ <Source: BindingSource> (provider: Self, source: Source) -> Disposable? where Value == Source.Value?Parameters
targetA target to be bond to.
sourceA source to bind.
Return Value
A disposable that can be used to terminate binding before the deinitialization of the target or the source’s
completedevent.
View on GitHub
Install in Dash
BindingTargetProvider Protocol Reference