The document state.


struct State


A UIDocument object stores the current state of the document in the documentState property. To receive notifications about changes in document state, observe the stateChangedNotification notification.



static var normal: UIDocument.State

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

static var closed: UIDocument.State

There was an error in reading the document: the document has either not been successfully opened, or has been since closed. The document properties might not be valid.

static var inConflict: UIDocument.State

Conflicts exist for the document file located at fileURL. You can access these conflicting document versions by calling the otherVersionsOfItemAtURL: class method of the NSFileVersion class. This method returns an array of NSFileVersion objects. You can then resolve the conflicting versions—for example, programmatically attempt to merge the versions or present the document versions to the user and request him or her to pick one.

static var savingError: UIDocument.State

There was an error in saving or reverting the document.

static var editingDisabled: UIDocument.State

The document is busy and it is not currently safe for user edits. This state is set just before UIDocument calls the disableEditing() method. It calls enableEditing() when it becomes safe to edit again. UIDocument also sets this state when an error prevents the reverting of a document.

static var progressAvailable: UIDocument.State

The document is being downloaded or uploaded and progress information is available. When this state is set, you can use the progress property of the document to monitor the current operation.


Conforms To