How to develop status bar app in OS X Yosemite?

前端 未结 1 926
心在旅途
心在旅途 2021-02-08 22:57

I\'ve been trying to develop a status bar app for Yosemite, which is my first OS X app, but when I searched for the document, the NSStatusItem documentation says th

1条回答
  •  无人共我
    2021-02-08 23:46

    In 10.10, NSStatusItem has a new button property which returns an instance of a new class, NSStatusBarButton inheriting from NSButton. This is what should be used instead of setting a custom view on the status item. The deprecated methods of NSStatusItem just forward on to the corresponding method of the button.

    See the header files (NSStatusItem.h and NSStatusBarButton.h) for the most current and accurate documentation. The prerelease class references seem to be incomplete. There's some brief, indirect mentions of these changes in the 10.10 AppKit release notes.

    0 讨论(0)
提交回复
热议问题