<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSKeyValueChangeKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@T@NSKeyValueChangeKey"
  },
  "title" : "NSKeyValueChangeKey"
}
-->

# NSKeyValueChangeKey

The keys that can appear in the change dictionary.

```
struct NSKeyValueChangeKey
```

## Discussion

These constants are used as keys in the change dictionary passed to <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/observeValue(forKeyPath:of:change:context:)>.

## Topics

### Type Properties

[`NSKeyValueChangeIndexesKey`](/documentation/Foundation/NSKeyValueChangeKey/indexesKey)

If the value of the [`kindKey`](/documentation/Foundation/NSKeyValueChangeKey/kindKey) entry is [`NSKeyValueChange.insertion`](/documentation/Foundation/NSKeyValueChange/insertion), [`NSKeyValueChange.removal`](/documentation/Foundation/NSKeyValueChange/removal), or [`NSKeyValueChange.replacement`](/documentation/Foundation/NSKeyValueChange/replacement), the value of this key is an `NSIndexSet` object that contains the indexes of the inserted, removed, or replaced objects.

[`NSKeyValueChangeKindKey`](/documentation/Foundation/NSKeyValueChangeKey/kindKey)

An `NSNumber` object that contains a value corresponding to one of the [`NSKeyValueChange`](/documentation/Foundation/NSKeyValueChange) enums, indicating what sort of change has occurred.

[`NSKeyValueChangeNewKey`](/documentation/Foundation/NSKeyValueChangeKey/newKey)

If the value of the [`kindKey`](/documentation/Foundation/NSKeyValueChangeKey/kindKey) entry is [`NSKeyValueChange.setting`](/documentation/Foundation/NSKeyValueChange/setting), and [`new`](/documentation/Foundation/NSKeyValueObservingOptions/new) was specified when the observer was registered, the value of this key is the new value for the attribute.

[`NSKeyValueChangeNotificationIsPriorKey`](/documentation/Foundation/NSKeyValueChangeKey/notificationIsPriorKey)

If the [`prior`](/documentation/Foundation/NSKeyValueObservingOptions/prior) option was specified when the observer was registered this notification is sent prior to a change.

[`NSKeyValueChangeOldKey`](/documentation/Foundation/NSKeyValueChangeKey/oldKey)

If the value of the [`kindKey`](/documentation/Foundation/NSKeyValueChangeKey/kindKey) entry is [`NSKeyValueChange.setting`](/documentation/Foundation/NSKeyValueChange/setting), and [`old`](/documentation/Foundation/NSKeyValueObservingOptions/old) was specified when the observer was registered, the value of this key is the value before the attribute was changed.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)