I have a custom built statusbar in my project (macOS, Xcode 10, Cocoa, Swift).
I would like to change the font and the color of my text that will appear in the status.
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
@IBOutlet private weak var mainMenu: NSMenu!
@IBOutlet private weak var quitMenuItem: NSMenuItem!
.....code....
private let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
// MARK: NSApplicationDelegate
func applicationDidFinishLaunching(_ aNotification: Notification) {
.....code....
// Set the main menu
statusItem.menu = mainMenu
.....code....
}