[英]Animation in NSStatusItem
I'm writing a status bar application for OS X and I want to use an animated 'loading' gif as the icon when waiting to download a file. 我正在为OS X编写状态栏应用程序,我想在等待下载文件时使用动画“加载”gif作为图标。
Passing the gif in an NSImage to the setImage:
method of the NSStatusItem set the status bar icon as the first frame of the image, but was not animated. 将NSImage中的gif传递给NSStatusItem的
setImage:
方法,将状态栏图标设置为图像的第一帧,但未设置动画。 I put the NSImage in an NSImageView and passed that to the setView:
method but then the status item didn't show up at all. 我将NSImage放在NSImageView中并将其传递给
setView:
方法,但状态项根本没有显示。
How can I do this? 我怎样才能做到这一点?
you might wanna use the NSProgressIndicator of spinner style and use setView to it. 你可能想使用微调器样式的NSProgressIndicator并使用setView。 I'm having the same problem as you.
我和你有同样的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.