Make a NSAlert the topmost window?
问题 I've created the main window in my application to have these settings: [self setLevel:kCGDesktopWindowLevel + 1]; [self setCollectionBehavior: (NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorIgnoresCycle)]; It's a very custom window that sort of floats above the desktop. In addition, it's a menu-bar application ( LSUIElement ). Alright, so I need to display an alert if something isn't right. Here's how I'm doing it: NSAlert *alert