Enumeration

NSLayoutAttribute

The part of the object’s visual representation that should be used to get the value for the constraint.

Symbols

Constants

case left

The left side of the object’s alignment rectangle.

case right

The right side of the object’s alignment rectangle.

case top

The top of the object’s alignment rectangle.

case bottom

The bottom of the object’s alignment rectangle.

case leading

The leading edge of the object’s alignment rectangle.

case trailing

The trailing edge of the object’s alignment rectangle.

case width

The width of the object’s alignment rectangle.

case height

The height of the object’s alignment rectangle.

case centerX

The center along the x-axis of the object’s alignment rectangle.

case centerY

The center along the y-axis of the object’s alignment rectangle.

case lastBaseline

The object’s baseline. For objects with more than one line of text, this is the baseline for the bottommost line of text.

case firstBaseline

The object’s baseline. For objects with more than one line of text, this is the baseline for the topmost line of text.

case leftMargin

The object’s left margin. For UIView objects, the margins are defined by their layoutMargins property.

case rightMargin

The object’s right margin. For UIView objects, the margins are defined by their layoutMargins property.

case topMargin

The object’s top margin. For UIView objects, the margins are defined by their layoutMargins property.

case bottomMargin

The object’s bottom margin. For UIView objects, the margins are defined by their layoutMargins property.

case leadingMargin

The object’s leading margin. For UIView objects, the margins are defined by their layoutMargins property.

case trailingMargin

The object’s trailing margin. For UIView objects, the margins are defined by their layoutMargins property.

case centerXWithinMargins

The center along the x-axis between the object’s left and right margin. For UIView objects, the margins are defined by their layoutMargins property.

case centerYWithinMargins

The center along the y-axis between the object’s top and bottom margin. For UIView objects, the margins are defined by their layoutMargins property.

case notAnAttribute

A placeholder value that is used to indicate that the constraint’s second item and second attribute are not used in any calculations. Use this value when creating a constraint that assigns a constant to an attribute. For example, item1.height >= 40. If a constraint only has one item, set the second item to nil, and set the second attribute to NSLayoutAttributeNotAnAttribute.