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

Challenge: Boxless NerdTabViewController

NSBox makes your task easier in NerdTabViewController by simplifying adding the content view to the hierarchy and sizing it appropriately. Test your understanding of the view hierarchy and Auto Layout constraints by replacing the NSBox in NerdTabViewController with a plain NSView.

Instead of setting the box’s contentView, you will add the selected child view controller’s view as a subview. Use Auto Layout to ensure that the view resizes with its container view. Do not forget to remove the previously selected view controller’s view!

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