In AppDelegate.swift I've declared an NSStatusBar object like this:
var statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
statusItem.button?.title = "chess"
statusItem.button?.target = self
statusItem.button?.action = #selector(showSettings)
and works fine, but I want to change the title in the viewController.swift
I trying this (In view controller):
var appd = AppDelegate()
appd.statusItem.button?.title = "ELO: \(parsing2.chess_daily.last.rating)"
But the title not change... how can I do this???
AppDelegatethat changes the title, and then call that from your vc:AppDelegate().changeStatusTitle("ELO")