---
title: prior
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nskeyvalueobservingoptions/prior
---

# prior

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

## Declaration

```swift
static var prior: NSKeyValueObservingOptions { get }
```

## Discussion

Discussion The change dictionary in a notification sent before a change always contains an notificationIsPriorKey entry whose value is an NSNumber object that contains the Boolean value true, but never contains an newKey entry. When this option is specified the change dictionary in a notification sent after a change contains the same entries that it would contain if this option were not specified. You can use this option when the observer’s own key-value observing-compliance requires it to invoke one of the -willChange... methods for one of its own properties, and the value of that property depends on the value of the observed object’s property. (In that situation it’s too late to easily invoke -willChange... properly in response to receiving an observeValue(forKeyPath:of:change:context:) message after the change.)

## See Also

### Constants

- [new](foundation/nskeyvalueobservingoptions/new.md)
- [old](foundation/nskeyvalueobservingoptions/old.md)
- [initial](foundation/nskeyvalueobservingoptions/initial.md)
