I open a NSWindow from my main NSWindow.
DropHereWindowController *dropHereWindowController = [[DropHereWindowController alloc] initWithWindowNibName:@\"Drop
Swift 4.0, Xcode 9.0
You can set the level
property of your NSWindow
to floating
. For example, if you are subclassing NSWindow
, you can set it in the override init.
self.level = .floating
You also can get NSWindow
from your NSWindowController
by self.window?
.
There are different levels:
NSNormalWindowLevel
The default level for NSWindow objects.
NSFloatingWindowLevel
Useful for floating palettes.
NSSubmenuWindowLevel
Reserved for submenus. Synonymous with NSTornOffMenuWindowLevel, which is preferred.
NSTornOffMenuWindowLevel
The level for a torn-off menu. Synonymous with NSSubmenuWindowLevel.
NSModalPanelWindowLevel
The level for a modal panel.
NSMainMenuWindowLevel
Reserved for the application’s main menu.
NSStatusWindowLevel
The level for a status window.
NSPopUpMenuWindowLevel
The level for a pop-up menu.
NSScreenSaverWindowLevel
The level for a screen saver.