O'Reilly logo

Mac OS® X Advanced Development Techniques by Joe Zobkiw

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9. Status Items

“Should? Will. Should? Will. Should? Will. Did!”

—quote based on Cocoa delegate methods

This chapter discusses those little black and white icons on the right side of the menu bar as displayed in Figure 9.1. Before we assign these items a real name, let's make something perfectly clear: They are not all created equal. Those created by Apple that can be command dragged to swap locations and added simply by dropping a bundle on the menu bar are called NSMenuExtras. However, the NSMenuExtra class is a private API, so, as developers who do not work for Apple, we need to create NSStatusItems instead.

Figure 9.1. The menu bar filled with “little black and white icons.”

Also, Apple says status items are reserved for Apple's use only ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required