Animation in NSStatusItem

I am writing a status bar application for OS X and I want to use an animated gif “download” as an icon while waiting for a file to load.

Passing gif in NSImage to the setImage: method setImage: for NSStatusItem set the status bar icon as the first frame of the image, but was not animated. I put NSImage in NSImageView and passed it to the setView: method, but then the status item didn't display at all.

How can i do this?

+4
source share
1 answer

you can use NSProgressIndicator for spinner style and use setView for it. I have the same problem as you.

+3
source

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


All Articles