8.7. Using Drawers
Drawers provide a way to add ancillary controls to a window whose interface is otherwise busy displaying something else. Visually, drawers appear to be a special kind of window attached to a parent window, perhaps like a distant cousin of the sheet.
Slide Master uses a table view in its slide show documents for displaying lists of slides, as shown in Figure 8-30. The table view lives in a drawer where it can be tucked out of sight when it's not needed. The table view also controls which slide is visible in the slide show document window.
Figure 8.30. Figure 8-30
In the following Try It Out, you add a drawer to the slide show document interface. This example focuses on configuring the slide show drawer. You also flesh out the slide show window a little in preparation for later examples. You learn more about table views, for example, in the next section.
8.7.1.
8.7.1.1. Try It Out: Adding a Drawer
Open the SlideShowWindow nib file in Interface Builder.
Drag a custom NSView instance from the Containers palette into your nib file. The NSView icon is labeled CustomView in the palette. When you drag the instance into your nib file, a view editor window appears. This view editor window works a lot like a window editor; you can change its size and drag controls and views into it.
Resize the custom view to 260 pixels wide and 350 pixels high. The exact dimensions aren't ...
Get Beginning Mac OS® X 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.