The object that contains the property to publish.
Initializerinit(object:
init(object:keyPath:options:)
Creates a key-value observing publisher for the given combination of object and key path, using publishing behavior options you provide.
Availability
- iOS 7.0+
- iPadOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 11.0+
Technology
- Foundation ファウンデーション
Declaration 宣言
init(object: Subject, keyPath: KeyPath
<Subject, Value>, options: NSKeyValueObservingOptions
)
Parameters パラメータ
object
keyPath
The key path, relative to the object receiving this message, of the property to publish.
options オプション
Options that determine which elements the publisher produces. Set this parameter to
[]
to receive new elements when the observed property changes.
Discussion 解説
This publisher produces a new element every time the observed property changes.