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

# performMiniaturize(_:)

Simulates the user clicking the minimize button by momentarily highlighting the button, then minimizing the window.

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

## Parameters

`sender`

The message’s sender.

## Discussion

If the window doesn’t have a minimize button or can’t be minimized for some reason, the system emits the alert sound.

## 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.

[`-  close`](/documentation/AppKit/NSWindow/close())

Removes the window from the screen.

[`-  performClose:`](/documentation/AppKit/NSWindow/performClose(_:))

Simulates the user clicking the close button by momentarily highlighting the button and then closing the window.



---

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)