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

# performZoom(_:)

This action method simulates the user clicking the zoom box by momentarily highlighting the button and then zooming the window.

```
func performZoom(_ sender: Any?)
```

## Parameters

`sender`

The object sending the message.

## Discussion

If the window doesn’t have a zoom box or can’t be zoomed for some reason, the computer beeps.

## See Also

[`styleMask`](/documentation/AppKit/NSWindow/styleMask-swift.property)

Flags that describe the window’s current style, such as if it’s resizable or in full-screen mode.



---

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)