Cocoa Programming for OS X: The Big Nerd Ranch Guide
by Aaron Hillegass, Adam Preble, Nate Chandler
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access