---
title: oldKey
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nskeyvaluechangekey/oldkey
---

# oldKey

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.

## Declaration

```swift
static let oldKey: NSKeyValueChangeKey
```

## Discussion

Discussion For NSKeyValueChange.removal or NSKeyValueChange.replacement, if old was specified when the observer was registered, the value is an NSArray instance that contains the objects that have been removed or have been replaced by other objects, respectively.

## See Also

### Type Properties

- [indexesKey](foundation/nskeyvaluechangekey/indexeskey.md)
- [kindKey](foundation/nskeyvaluechangekey/kindkey.md)
- [newKey](foundation/nskeyvaluechangekey/newkey.md)
- [notificationIsPriorKey](foundation/nskeyvaluechangekey/notificationispriorkey.md)
