When designing windows, you need to consider what will happen when the user tries to resize them. For some windows, such as simple sheets and dialog boxes, you may choose to prohibit resizing. But most user-friendly interfaces allow the user to resize windows as they see fit.
An interface element normally responds in two possible ways when a window is resized. The element may remain stationary, fixed in an area of the screen, or the element may change size along with the window. Some elements may do both: remain fixed vertically and resize themselves horizontally. Interface Builder provides tools for defining what happens to its contents when a window is resized.
In the following Try It Out, you build a simple resizable Cocoa window. Figure 4-26 shows the window in two sizes. Don't worry too much about what this interface is supposed to represent; it's really just an opportunity to practice item layout.
In Interface Builder, create a new Cocoa Empty project. Your nib window appears.
Drag a Window item from the Windows palette into your nib's Instances tab. An instance named Window is added to your nib file and a blank window representing that instance appears.
Choose ToolsShow Inspector to open the Inspector. The Inspector displays the settings for the new window. ...