Adding Constraints to RaiseMan

In this chapter you will use Auto Layout in RaiseMan to allow the table view to resize with the window while the buttons stay fixed to the right side of the window.

In your RaiseMan project, open Document.xib. Right now, there are no constraints in this XIB and it looks like Figure 25.1.

Figure 25.1  RaiseMan unconstrained

RaiseMan unconstrained

Constraints from subview to superview

First you will add constraints for each of the three views – the scroll view which contains the table view, the Add Employee button, and the Remove button – to the content view of the window. First, select the scroll view and ...

Get Cocoa Programming for OS X: The Big Nerd Ranch Guide 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.