I open a NSWindow from my main NSWindow.
DropHereWindowController *dropHereWindowController = [[DropHereWindowController alloc] initWithWindowNibName:@"DropHereWindow"];
[dropHereWindowController showWindow:nil];
I want this window to stay on top of my main window when dragging a file from the finder to that "DropHereWindow". However when opening the finder (not having the focus any longer) my "DropHereWindow" goes behind my main window.
I tried orderFront, makeKey, makeKeyAndFront but nothing helped. What can I do about it?
Method:
- (void)setLevel:(NSInteger)windowLevel
Sub-class the NSWindow:
[self setLevel: NSStatusWindowLevel];
Or simply use:
[window setLevel: NSStatusWindowLevel];
Available levels: