Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我通过 setView: 为 NSStatusItem 设置了一个视图,如果我想以后如何删除它?这甚至可能吗?谢谢。
要删除它,只需调用:
[[NSStatusBar systemStatusBar] removeStatusItem: myStatusItem]
即使您通过 setTitle 或 setImage 定义状态项,这也有效。