Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
More interesting dynamic behavior happens when you directly interact with the view hierarchy. Every item in the view hierarchy is an instance of NSView. This class is responsible for maintaining the hierarchy and ensuring that drawing and event messages move up and down it automatically.
You can get the children of a given view by sending it a -subviews message. This returns an array of all of the direct child views of the receiver. You can then recursively send each of these views a -subviews message to get the entire view hierarchy.