Structure

NSKeyValueChangeKey

The keys that can appear in the change dictionary.

Declaration

struct NSKeyValueChangeKey

Overview

These constants are used as keys in the change dictionary passed to observeValue(forKeyPath:of:change:context:).

Topics

Type Properties

static let indexesKey: NSKeyValueChangeKey

If the value of the kindKey entry is NSKeyValueChange.insertion, NSKeyValueChange.removal, or NSKeyValueChange.replacement, the value of this key is an NSIndexSet object that contains the indexes of the inserted, removed, or replaced objects.

static let kindKey: NSKeyValueChangeKey

An NSNumber object that contains a value corresponding to one of the NSKeyValueChange enums, indicating what sort of change has occurred.

static let newKey: NSKeyValueChangeKey

If the value of the kindKey entry is NSKeyValueChange.setting, and new was specified when the observer was registered, the value of this key is the new value for the attribute.

static let notificationIsPriorKey: NSKeyValueChangeKey

If the prior option was specified when the observer was registered this notification is sent prior to a change.

static let oldKey: NSKeyValueChangeKey

If the value of the kindKey entry is NSKeyValueChange.setting, and old was specified when the observer was registered, the value of this key is the value before the attribute was changed.

Relationships

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software