简体   繁体   中英

Removing NSStatusItem view

One I set a view for NSStatusItem by setView:, how can i remove it later on if I want to? Is this even possible? Thanks.

To remove it, just call:

[[NSStatusBar systemStatusBar] removeStatusItem: myStatusItem]

This works even when you define your status item through setTitle or setImage.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM