Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Views are arranged in a hierarchy. Views are typically subclasses of NSView, which implements support for maintaining the view hierarchy. Whenever a view is drawn, the superview sets up the coordinate transform, as described in the last section, and instructs it to draw.
Although any view can contain other views, some are explicitly designed to do so. These typically expose some extra methods for manipulating the child views. Cocoa provides some very easy-to-use views that are designed to contain other views. The simplest of all is the NSView class itself, which can contain children in arbitrary locations. When you create a new window, it will have a NSView as its content view, and all of the views you drag into it in Interface Builder will be set as parents of this view. Others provide a little more functionality than this, such as clipping, scrolling, or automatically hiding their children.