<!--
{
  "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/updateChangeCount(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDocument(im)updateChangeCount:"
  },
  "title" : "updateChangeCount(_:)"
}
-->

# updateChangeCount(_:)

Updates the change counter by indicating the kind of change.

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

## Parameters

`change`

A constant that indicates whether a change has been made, cleared, undone, or redone. See [`UIDocument.ChangeKind`](/documentation/UIKit/UIDocument/ChangeKind) for more information.

## Discussion

Calling this method can affect the value returned by [`hasUnsavedChanges`](/documentation/UIKit/UIDocument/hasUnsavedChanges). You shouldn’t need to call method this if you access an <doc://com.apple.documentation/documentation/Foundation/UndoManager> object from the [`undoManager`](/documentation/UIKit/UIDocument/undoManager) property (or assign a custom one to it) and register changes with the undo manager.

---

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)