Container Views and Controls

Several of Cocoa’s view subclasses can be wrapped around other Cocoa views. Because of these behaviors, they are often referred to as containers. Boxes, scroll views, tab views, split views, and matrices can all be considered containers. Boxes simply draw a pretty border around the views they contain. A scroll view allows a user to scroll around a view that is much larger than the scroll view itself. Tab views allow users to switch between several related views. Split views provide a separator that can be dragged to reallocate screen real estate between two views.

NOTE

Most Cocoa containers use both the GOF Decorator and GOF Facade patterns. Chapter 6, “Cocoa Design Patterns,” briefly discusses these and other patterns ...

Get Cocoa® Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.