Removing the NSStatusItem View

One, I set the view for NSStatusItem using setView: how can I remove it later if I want? Is it possible? Thank.

+3
source share
1 answer

To remove it, just call:

[[NSStatusBar systemStatusBar] removeStatusItem: myStatusItem]

This works even if you define your status element through setTitle or setImage.

+7
source

Source: https://habr.com/ru/post/1796357/


All Articles