Why I cannot add new alignment constraints on my scroll view ?
Asked
Active
Viewed 8,494 times
2 Answers
34
In order to add alignment constraints, you must select two or more items before pressing the Align button. This is how Interface Builder knows which two objects to align. You can select the items by dragging a box around them, or you can hold down Shift and select the items.

vacawama
- 150,663
- 30
- 266
- 294
-
Thanks a lot! This is very useful! – Oliver Zhang Apr 02 '17 at 13:23
12
If you are aligning to centre horizontally/vertically (which doesn't require a second view for reference) and still get this issue, then go to the size inspector (ruler icon in the top right navbar) and change the layout dropdown to Automatic.
This should then enable values and the button in the alignment constraints dialog.

Maximillion Bartango
- 1,533
- 1
- 19
- 34