---
title: "updateChangeCount(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uidocument/updatechangecount(_:)"
---

# updateChangeCount(_:)

Updates the change counter by indicating the kind of change.

## Declaration

```swift
func updateChangeCount(_ change: UIDocument.ChangeKind)
```

## Parameters

- `change`: A constant that indicates whether a change has been made, cleared, undone, or redone. See doc://com.apple.uikit/documentation/UIKit/UIDocument/ChangeKind for more information.

## Discussion

Discussion Calling this method can affect the value returned by hasUnsavedChanges. You shouldn’t need to call method this if you access an UndoManager object from the undoManager property (or assign a custom one to it) and register changes with the undo manager.

## See Also

### Tracking changes and autosaving

- [hasUnsavedChanges](uikit/uidocument/hasunsavedchanges.md)
- [undoManager](uikit/uidocument/undomanager.md)
- [changeCountToken(for:)](uikit/uidocument/changecounttoken(for:).md)
- [updateChangeCount(withToken:for:)](uikit/uidocument/updatechangecount(withtoken:for:).md)
- [autosave(completionHandler:)](uikit/uidocument/autosave(completionhandler:).md)
