How can I get the NSMenu or NSMenuItem for the application menu (the one in the menu bar next to the apple menu). It seems to be automatically created and independent from t
private final func manageMenus(){
let mainMenu = NSApplication.shared.mainMenu
if let editMenu = mainMenu?.item(at: 1)?.submenu{
for item in editMenu.items{
print(item.title)
}
}
}
so You can also enable it:
....
for item in editMenu.items{
item.isEnabled = true
}