Enumeration

NSKeyValueObservingOptions

The values that can be returned in a change dictionary.

Declaration

typedef enum NSKeyValueObservingOptions : NSUInteger {
    ...
} 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 observeValueForKeyPath:ofObject:change:context:. You can pass 0 if you require no change dictionary values.

Topics

Constants

NSKeyValueObservingOptionNew

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

NSKeyValueObservingOptionOld

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

NSKeyValueObservingOptionInitial

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

NSKeyValueObservingOptionPrior

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