O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required