<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/Level-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSWindowLevel"
  },
  "title" : "NSWindow.Level"
}
-->

# NSWindow.Level

The standard window levels in macOS.

```
struct Level
```

## Discussion

The stacking of levels takes precedence over the stacking of windows within each level. That is, even the bottom window in a level will obscure the top window of the next level down. Levels are listed in order from lowest to highest. These constants are mapped (using `#define` statements) to corresponding elements in <doc://com.apple.documentation/documentation/CoreGraphics/CGWindowLevelKey>.

## Topics

### Constants

[`dock`](/documentation/AppKit/NSWindow/Level-swift.struct/dock)

The level for the dock.

[`floating`](/documentation/AppKit/NSWindow/Level-swift.struct/floating)

Useful for floating palettes.

[`mainMenu`](/documentation/AppKit/NSWindow/Level-swift.struct/mainMenu)

Reserved for the application’s main menu.

[`modalPanel`](/documentation/AppKit/NSWindow/Level-swift.struct/modalPanel)

The level for a modal panel.

[`normal`](/documentation/AppKit/NSWindow/Level-swift.struct/normal)

The default level for `NSWindow` objects.

[`popUpMenu`](/documentation/AppKit/NSWindow/Level-swift.struct/popUpMenu)

The level for a pop-up menu.

[`screenSaver`](/documentation/AppKit/NSWindow/Level-swift.struct/screenSaver)

The level for a screen saver.

[`statusBar`](/documentation/AppKit/NSWindow/Level-swift.struct/statusBar)

The level for a status window.

[`submenu`](/documentation/AppKit/NSWindow/Level-swift.struct/submenu)

Reserved for submenus. Synonymous with `NSTornOffMenuWindowLevel`, which is preferred.

[`tornOffMenu`](/documentation/AppKit/NSWindow/Level-swift.struct/tornOffMenu)

The level for a torn-off menu. Synonymous with `NSSubmenuWindowLevel`.

### Creating a Window Level

[`init(_:)`](/documentation/AppKit/NSWindow/Level-swift.struct/init(_:))

Creates a window level using the given integer value.

[`init(rawValue:)`](/documentation/AppKit/NSWindow/Level-swift.struct/init(rawValue:))

Creates a window level using the given raw value.



---

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)