Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect if menu bar is hidden or visible

Is there a way in Cocoa to receive a notification (or something similar) when the menu bar becomes hidden or visible? I tried looking around and have not found any information on this topic.

Thanks

like image 266
Matthew S. Avatar asked Jan 26 '16 07:01

Matthew S.


1 Answers

I solved this by using Carbon's menu event handlers.

I registered for events kEventMenuBarHidden and kEventMenuBarShown under the class kEventClassMenu.

like image 144
Matthew S. Avatar answered Sep 24 '22 00:09

Matthew S.