---
title: occlusionState
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsapplication/occlusionstate-swift.property
---

# occlusionState

The occlusion state of the app.

## Declaration

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

## Discussion

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

### Related Documentation

- [didChangeOcclusionStateNotification](appkit/nsapplication/didchangeocclusionstatenotification.md)

### Getting the Occlusion State

- [NSApplication.OcclusionState](appkit/nsapplication/occlusionstate-swift.struct.md)
