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

# hide(_:)

Hides all the receiver’s windows, and the next app in line is activated.

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

## Parameters

`sender`

The object that sent the command.

## Discussion

This method is usually invoked when the user chooses Hide in the app’s main menu. When this method begins, it posts an [`willHideNotification`](/documentation/AppKit/NSApplication/willHideNotification) to the default notification center. When it completes successfully, it posts an [`didHideNotification`](/documentation/AppKit/NSApplication/didHideNotification).

## See Also

[`-  miniaturizeAll:`](/documentation/AppKit/NSApplication/miniaturizeAll(_:))

Miniaturizes all the receiver’s windows.

[`-  applicationDidHide:`](/documentation/AppKit/NSApplicationDelegate/applicationDidHide(_:))

Tells the delegate that the app is now hidden.

[`-  applicationWillHide:`](/documentation/AppKit/NSApplicationDelegate/applicationWillHide(_:))

Tells the delegate that the app is about to be hidden.



---

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)