---
title: didChangeOcclusionStateNotification
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nsapplication/didchangeocclusionstatenotification
---

# didChangeOcclusionStateNotification

Posted when the app’s occlusion state changes.

## Declaration

```swift
class let didChangeOcclusionStateNotification: NSNotification.Name
```

## Discussion

Discussion The system posts this notification on the main actor.  Upon receiving this notification, you can query the app for its occlusion state. Note that this only notifies about changes in the state of the occlusion, not when the occlusion region changes. You can use this notification to increase responsiveness and save power by halting any expensive calculations that the user can’t see. To observe this notification using Swift concurrency, use NSApplication.DidChangeOcclusionStateMessage.

## See Also

### Notifications

- [didBecomeActiveNotification](appkit/nsapplication/didbecomeactivenotification.md)
- [didChangeScreenParametersNotification](appkit/nsapplication/didchangescreenparametersnotification.md)
- [didFinishLaunchingNotification](appkit/nsapplication/didfinishlaunchingnotification.md)
- [didHideNotification](appkit/nsapplication/didhidenotification.md)
- [didResignActiveNotification](appkit/nsapplication/didresignactivenotification.md)
- [didUnhideNotification](appkit/nsapplication/didunhidenotification.md)
- [didUpdateNotification](appkit/nsapplication/didupdatenotification.md)
- [willBecomeActiveNotification](appkit/nsapplication/willbecomeactivenotification.md)
- [willFinishLaunchingNotification](appkit/nsapplication/willfinishlaunchingnotification.md)
- [willHideNotification](appkit/nsapplication/willhidenotification.md)
- [willResignActiveNotification](appkit/nsapplication/willresignactivenotification.md)
- [willTerminateNotification](appkit/nsapplication/willterminatenotification.md)
- [willUnhideNotification](appkit/nsapplication/willunhidenotification.md)
- [willUpdateNotification](appkit/nsapplication/willupdatenotification.md)
- [didFinishRestoringWindowsNotification](appkit/nsapplication/didfinishrestoringwindowsnotification.md)
