---
title: documentState
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uidocument/documentstate
---

# documentState

The current state of the document.

## Declaration

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

## Discussion

Discussion When document state changes, the UIDocument object stores a constant identifying the new state in this property. See the UIDocument.State enum for descriptions of these constants. To receive notifications about changes in document state, observe the stateChangedNotification notification.

## See Also

### Accessing document attributes

- [fileURL](uikit/uidocument/fileurl.md)
- [localizedName](uikit/uidocument/localizedname.md)
- [fileType](uikit/uidocument/filetype.md)
- [fileModificationDate](uikit/uidocument/filemodificationdate.md)
- [progress](uikit/uidocument/progress.md)
