init(object: Subject, keyPath : KeyPath<Subject, Value>, options: NSKeyValueObservingOptions)
Creates a key-value observing publisher for the given combination of object and key path, using publishing behavior options you provide.
Availability
Technology
struct KeyValueObservingPublisher<Subject, Value> where Subject : NSObject
Use this publisher to integrate a property that’s compliant with key-value observing into a Combine publishing chain. You can create a publisher of this type with the NSObject
instance method publisher(for:
, passing in the key path and a set of NSKey
.
init(object: Subject, keyPath : KeyPath<Subject, Value>, options: NSKeyValueObservingOptions)
let object: Subject
let keyPath : KeyPath<Subject, Value>
let options: NSKeyValueObservingOptions