[This is preliminary documentation and is subject to change.]

Defines options used when you observe a key path.

Namespace:  KNKVC
Assembly:  KNKVC (in KNKVC.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
[FlagsAttribute]
public enum KNKeyValueObservingOptions
Visual Basic (Declaration)
<FlagsAttribute> _
Public Enumeration KNKeyValueObservingOptions
Visual C++
[FlagsAttribute]
public enum class KNKeyValueObservingOptions

Members

Member nameDescription
KNKeyValueObservingOptionNew
If KNKeyValueObservingOptionNew is specified, the change dictionary will contain the new value of the observed key path in the key KNKeyValueChangeNewKey This may be null.
KNKeyValueObservingOptionOld
If KNKeyValueObservingOptionOld is specified, the change dictionary will contain the new value of the observed key path in the key KNKeyValueChangeOldKey. This may be null.
KNKeyValueObservingOptionInitial
If KNKeyValueObservingOptionInitial is specified, a KVO notification will be sent to the observer before addObserverForKeyPath returns. If KNKeyValueObservingOptionNew is specified, the change dictionary will contain the value for the given key path in the key KNKeyValueChangeNewKey.
KNKeyValueObservingOptionPrior
If KNKeyValueObservingOptionPrior is specified, a KVO notification will be sent prior to the value changing as well as after. A change notification send prior to the value changing will contain the boolean true under the KNKeyValueChangeNotificationIsPriorKey key, and the current value under the KNKeyValueChangeOldKey if KNKeyValueObservingOptionOld is specified. Prior notifications never contain the KNKeyValueChangeNewKey key.

See Also