Structure

NSKeyValueObservingOptions

The values that can be returned in a change dictionary.

Declaration

struct NSKeyValueObservingOptions

Overview

These constants are passed to addObserver(_:forKeyPath:options:context:) and determine the values that are returned as part of the change dictionary passed to an observeValue(forKeyPath:of:change:context:). You can pass 0 if you require no change dictionary values.

Topics

Constants

static var new: NSKeyValueObservingOptions

Indicates that the change dictionary should provide the new attribute value, if applicable.

static var old: NSKeyValueObservingOptions

Indicates that the change dictionary should contain the old attribute value, if applicable.

static var initial: NSKeyValueObservingOptions

If specified, a notification should be sent to the observer immediately, before the observer registration method even returns.

static var prior: NSKeyValueObservingOptions

Whether separate notifications should be sent to the observer before and after each change, instead of a single notification after the change.

Relationships

Conforms To