I'm working on a status bar app in Swift. I tried to hide the window by adding Application is agent (UIElement)
item and set it to YES
, but it just doesn't work - it always shows the window and the menu bar.
My storyboard:
Info.plist:
What can I do ?
Configure your NSStatusBar with a title, image, alternate image, etc.. and you'll see it in the system's Status Bar.
let statusItem = NSStatusBar.systemStatusBar().statusItemWithLength(NSVariableStatusItemLength)
statusItem.button?.title = "LG"
statusItem.button?.image = NSImage(named: "LGIcon")
statusItem.button?.alternateImage = NSImage(named: "LGIcon")