All the constraints affecting the currently selected view appear as colored lines on the canvas. The shape, stroke type, and line color can tell you a lot about the current state of the constraint. Badges on lines show more information about the constraint relationship or indicate that the current value of the constant for the constraint is different from the expected value.
Line or Badge | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
I-bar | Lines with T-shaped end-caps-bars show the size of a space. This space can be either the distance between two views, or the height or width of an view. | ||||||||||
plain line | Straight lines with no end-caps show where edges align. These lines can also be used to connect views that have a 0-point space between them. | ||||||||||
solid line | Solid lines represent required constraints (priority = 1000). | ||||||||||
dashed line | Dashed lines represent optional constraints (priority < 1000). | ||||||||||
red lines | Red lines indicate one of the views affected by a constraint has an error. Either the view has an ambiguous layout, or its layout is not satisfiable. | ||||||||||
orange lines | Orange lines indicate that the frame of one of the views affected by this constraint is not in the correct position based on the current set of constraints. | ||||||||||
blue lines | Blue lines indicate views affected by the constraint have a non-ambiguous, satisfiable layout, and the view’s frame is in the correct position as calculated by the Auto Layout engine. | ||||||||||
equal badge | A blue badge containing an equal (=) sign denotes a constraint that give two views an equal width or an equal height. The constraint for both views will have this badge. | ||||||||||
greater-than-or-equal badge | A small blue badge with a >= symbol denotes a greater-than-or-equal-to relationship. | ||||||||||
less-than-or-equal badge | A small blue badge with a <= symbol denotes a less-than-or-equal-to relationship. | ||||||||||
badge containing a number | The badges appear on orange and red lines. The number indicates the difference between the value of the constraint value on the canvas from the expected value. |