---
title: "hide(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsapplication/hide(_:)"
---

# hide(_:)

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

## Declaration

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

## Parameters

- `sender`: The object that sent the command.

## Discussion

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 to the default notification center. When it completes successfully, it posts an didHideNotification.

## See Also

### Related Documentation

- [miniaturizeAll(_:)](appkit/nsapplication/miniaturizeall(_:).md)
- [applicationDidHide(_:)](appkit/nsapplicationdelegate/applicationdidhide(_:).md)
- [applicationWillHide(_:)](appkit/nsapplicationdelegate/applicationwillhide(_:).md)

### Hiding Windows

- [isHidden](appkit/nsapplication/ishidden.md)
- [unhide(_:)](appkit/nsapplication/unhide(_:).md)
- [unhideWithoutActivation()](appkit/nsapplication/unhidewithoutactivation().md)
