At launch, several menus of the menuBar are hidden (defined in IB).
I want to show them later. How can I do this ?
For NSMenuItems, I use the hidden property, but there is no such property for NSMenu.
What's the way to di it ?
Solved.
a menu in MenuBar has both a
- NSMenu
- NSMenuItem
that defines it
In IB, such a menu in menu bar has the following structiure :
- NSMenuItem
- NSMenu
- its NSMenuItems
With outlets in IB such as :
@IBOutlet weak var fileMenu: NSMenu! // menu structure
@IBOutlet weak var fileMenuItem: NSMenuItem! // item in menuBar
FileMenuItem.hidden = false // or true will hide / show the menu in menu bar