22

Why I cannot add new alignment constraints on my scroll view ?

alignement

cmii
  • 3,556
  • 8
  • 38
  • 69

2 Answers2

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