How to create a line status application in OS X Yosemite?

I am trying to develop a state application for Yosemite, which is my first OS X application, but when I searched for the document, the NSStatusItem documentation says that almost all properties and methods are there (e.g. .title , .highlightMode and .image ) are deprecated in OS X 10.10.

It is so interesting how I can create a status bar application for Yosemite. I found these documents from Dash, but it’s strange that the Apple documentation does not make it even obsolete. But I know that they usually slowly update the documentation, although I wonder how and where Dash got these seemingly updated information ...

So what is right? And if it's out of date, where can I find Yosemite-style status bar development resources?

I am using Xcode 6.1 Beta and Swift.

+7
cocoa osx-yosemite macos nsstatusitem
source share
1 answer

In 10.10, NSStatusItem has a new button property, which returns an instance of the new NSStatusBarButton class inheriting from NSButton . This is what should be used instead of customizing the custom view in the status element. Deprecated NSStatusItem methods simply jump to the corresponding button method.

See the header files (NSStatusItem.h and NSStatusBarButton.h) for the most current and accurate documentation. Samples of the preerelease class seem incomplete. There are a few brief indirect references to these changes in AppKit 10.10 Release Notes.

+15
source share

All Articles