Chapter 6. Nibs and Icons
In the previous chapter, we created our simple four-function Calculator application. Although our Calculator works, it lacks the nifty presentation and many of the basic features of most Mac OS X applications. Some aspects were simply not implemented. In this and the following two chapters, we’ll use our simple Calculator as a starting point and slowly expand it, adding new features one by one.
In the first section of this chapter, we’ll configure the Interface Builder-supplied menus for the Calculator application and make some minor changes to the default About box (window) that is provided. Typically, the About box informs users about the version, author, and copyright of the application.
After seeing how the Cocoa-bundled About box works, we’ll create a new About box from scratch for our Calculator. We will use this new About box to demonstrate how to manage multiple nibs (interfaces) within a single application. In the last section of this chapter, we’ll see how Cocoa allows you to specify an icon for an application.
Customizing MainMenu.nib
As we saw in Chapter 5, Project Builder creates your application (i.e., new project) from a stored template. It’s up to you to customize this template to fit your own needs. We’ve done a lot of that already, but there are a lot more possibilities, as we’ll soon see.
Changing the Application Menu
Perhaps the most obvious part of PB’s application
template interface (provided in MainMenu.nib
) that needs customization ...
Get Building Cocoa Applications: A Step by Step Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.