<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSKeyValueObservingOptions/prior",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSKeyValueObservingOptions@NSKeyValueObservingOptionPrior"
  },
  "title" : "prior"
}
-->

# prior

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

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

## Discussion

The change dictionary in a notification sent before a change always contains an [`notificationIsPriorKey`](/documentation/Foundation/NSKeyValueChangeKey/notificationIsPriorKey) entry whose value is an `NSNumber` object that contains the Boolean value <doc://com.apple.documentation/documentation/Swift/true>, but never contains an [`newKey`](/documentation/Foundation/NSKeyValueChangeKey/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 <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/observeValue(forKeyPath:of:change:context:)> message after the change.)

---

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)