<!--
{
  "availability" : [
    "macOS: 10.9.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSApplication/occlusionState-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSApplication(py)occlusionState"
  },
  "title" : "occlusionState"
}
-->

# occlusionState

The occlusion state of the app.

```
var occlusionState: NSApplication.OcclusionState { get }
```

## Discussion

The value of this property reflects whether any part of the app’s windows are visible to the user. Use this information to disable expensive screen updates when your app is not visible.

## See Also

[`didChangeOcclusionStateNotification`](/documentation/AppKit/NSApplication/didChangeOcclusionStateNotification)

Posted when the app’s occlusion state changes.



---

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)