Is there a way in Cocoa to receive a notification (or something similar) when a menu bar becomes hidden or visible? I tried to look back and did not find any information on this topic.
thanks
I solved this with Carbon event handlers.
I registered for the kEventMenuBarHidden and kEventMenuBarShown under the kEventClassMenu class.
kEventMenuBarHidden
kEventMenuBarShown
kEventClassMenu
It is not necessary to monitor notifications (Cocoa) for an object of class NSStatusBarWindow and notifications of the type
NSStatusBarWindow
NSWindowDidChangeOcclusionStateNotification
NSWindowWillCloseNotification
to receive a notification when a menu bar is displayed or hidden.