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

# orderOut(_:)

Removes the window from the screen list, which hides the window.

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

## Parameters

`sender`

The window to remove.

## Discussion

If the window is the key or main window, the window object immediately behind it is made key or main in its place. Calling [`orderOut(_:)`](/documentation/AppKit/NSWindow/orderOut(_:)) causes the window to be removed from the screen, but does not cause it to be released. See the [`close()`](/documentation/AppKit/NSWindow/close()) method for information on when a window is released. Calling [`orderOut(_:)`](/documentation/AppKit/NSWindow/orderOut(_:)) on a child window causes the window to be removed from its parent window before being removed.

The default animation based on the window type will be used when the window is ordered out unless it has been modified by the [`animationBehavior`](/documentation/AppKit/NSWindow/animationBehavior-swift.property) property.

## See Also

[`isReleasedWhenClosed`](/documentation/AppKit/NSWindow/isReleasedWhenClosed)

A Boolean value that indicates whether the window is released when it receives the `close` message.



---

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)