好的我有一个状态菜单应用程序,其中有一个“隐藏”菜单项。OSX:如何“取消隐藏”状态栏项目?
点击“隐藏”呼吁:
[[NSStatusBar systemStatusBar] removeStatusItem:statusItem]
当然这消除,即使它仍在运行,我从状态栏的应用程序。
当用户在应用程序文件夹中“打开”我的应用程序时,我希望将我的应用程序重新添加到系统状态栏中。问题是我无法在“ApplicationDidFinishLaunching”中插入这段代码,因为应用程序已经打开。所以我该怎么做?
请问这个帖子求助:http://stackoverflow.com/questions/843379/how-do-you-toggle-the-status-item-in -O-menubar-on-off-off-using-a-checkbox – petert