<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDocument/State",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@UIDocumentState"
  },
  "title" : "UIDocument.State"
}
-->

# UIDocument.State

Constants that specify the document state.

```
struct State
```

## Overview

A [`UIDocument`](/documentation/UIKit/UIDocument) object stores the current state of the document in the [`documentState`](/documentation/UIKit/UIDocument/documentState) property. To receive notifications about changes in document state, observe the [`stateChangedNotification`](/documentation/UIKit/UIDocument/stateChangedNotification) notification.

## Topics

### Constants

[`UIDocumentStateNormal`](/documentation/UIKit/UIDocument/State/normal)

The document is open, editing is enabled, and there are no conflicts or errors associated with it.

[`UIDocumentStateClosed`](/documentation/UIKit/UIDocument/State/closed)

There was an error in reading the document.

[`UIDocumentStateInConflict`](/documentation/UIKit/UIDocument/State/inConflict)

Conflicts exist for the document file located at the file URL.

[`UIDocumentStateSavingError`](/documentation/UIKit/UIDocument/State/savingError)

There was an error in saving or reverting the document.

[`UIDocumentStateEditingDisabled`](/documentation/UIKit/UIDocument/State/editingDisabled)

The document is busy and it isn’t currently safe for user edits.

[`UIDocumentStateProgressAvailable`](/documentation/UIKit/UIDocument/State/progressAvailable)

The document is being downloaded or uploaded and progress information is available.

### Initializers

[`init(rawValue:)`](/documentation/UIKit/UIDocument/State/init(rawValue:))

Creates a document state structure with the specified raw value.

## Relationships

### Conforms To

[`SetAlgebra`](/documentation/Swift/SetAlgebra)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`OptionSet`](/documentation/Swift/OptionSet)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`ExpressibleByArrayLiteral`](/documentation/Swift/ExpressibleByArrayLiteral)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

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)