Cocoa Programming for OS X: The Big Nerd Ranch Guide
by Aaron Hillegass, Adam Preble, Nate Chandler
25 Auto Layout
Have you tried resizing the RaiseMan window? The table view and buttons are steadfast in the face of your pointer. While their confidence is inspiring, as a user you want the window and its contents to match your needs. As a developer you want to build an app whose interface gracefully responds to resizing, accommodating the smallest and the largest of layouts without looking, well, broken.
As you learned in Chapter 17, views are positioned by their frame, which sets the view’s position within its superview. By default, when you place a view in Xcode, the view’s frame is static.
You could change your application’s layout dynamically by observing window resizing notifications and programmatically reposition your ...