O'Reilly logo

Cocoa® Programming for Mac OS® X For Dummies® by Erick Tejkowski

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

Chapter 9. Working with Interface Controls

In This Chapter

  • Working with button controls

  • Using radio and slider controls in your project

  • Working in tab views

  • Animating a progress indicator

  • Displaying data in a table

The Mac OS has long been renowned for its graphical user interface, which probably stems from the fact that people like interacting with computers by using metaphors that relate to the real world. Interface Builder is your tool for creating these metaphors. With it, you build your interface by adding different elements that your users will use to control the application. Because they're controlling the application, Cocoa calls these elements controls.

Cocoa has a rich set of interface controls for you to use in your own applications. With drag-and-drop and a few lines of code, you can add a variety of useful controls to your projects. This chapter guides you through the basics of interface controls in Interface Builder. You'll see how to use each of these controls by adding them to small projects.

By the end of the chapter, you'll have enough experience with controls to strike out on your own. The Cocoa framework is a vast one, and nothing prepares you better for programming than practice and experimentation.

Button Controls

Perhaps the most ubiquitous interface control is the button. From the bank's automatic teller machine to the doorbell at your front door, buttons are a nearly universal piece of hardware. Even your mouse and keyboard have button interfaces. Because so many ...

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