<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDocument/documentState",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDocument(py)documentState"
  },
  "title" : "documentState"
}
-->

# documentState

The current state of the document.

```
var documentState: UIDocument.State { get }
```

## Discussion

When document state changes, the [`UIDocument`](/documentation/UIKit/UIDocument) object stores a constant identifying the new state in this property. See the [`UIDocument.State`](/documentation/UIKit/UIDocument/State) enum for descriptions of these constants. To receive notifications about changes in document state, observe the [`stateChangedNotification`](/documentation/UIKit/UIDocument/stateChangedNotification) notification.

---

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)