<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/update()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(im)update"
  },
  "title" : "update()"
}
-->

# update()

Updates the window.

```
func update()
```

## Discussion

The `NSWindow` implementation of this method does nothing more than post an [`didUpdateNotification`](/documentation/AppKit/NSWindow/didUpdateNotification) notification to the default notification center. A subclass can override this method to perform specialized operations, but it should send an update message to `super` just before returning. For example, the `NSMenu` class implements this method to disable and enable menu commands.

An `NSWindow` object is automatically sent an `update` message on every pass through the event loop and before it’s displayed onscreen. You can manually cause an `update` message to be sent to all visible `NSWindow` objects through the `NSApplication` [`updateWindows()`](/documentation/AppKit/NSApplication/updateWindows()) method.

## See Also

[`setWindowsNeedUpdate(_:)`](/documentation/AppKit/NSApplication/setWindowsNeedUpdate(_:))

Sets whether the receiver’s windows need updating when the receiver has finished processing the current event.



---

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)