O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

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

About Controls

A control is a view that is designed specifically for user interaction. A control is implemented as a subclass of NSControl, which is a subclass of NSView. Controls are not part of the controller layer, so keep the terms control and controller separate in your mind. It may help to think of controls as user controls.

In RandomPassword, you worked with two controls: NSButton and NSTextField. In RGBWell, you will use two more: NSSlider and NSColorWell.

NSControl inherits from NSView, which inherits from NSResponder, which inherits from NSObject. Each member of the family tree adds some capabilities (Figure 5.10).

Figure 5.10  Inheritance diagram for NSControl

NSControl adds the ability to ...

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