Instance Method

constraintEqualToSystemSpacingBelowAnchor:multiplier:

Returns a constraint that defines the specific distance at which the current anchor is positioned below the specified anchor.

Declaration

- (NSLayoutConstraint *)constraintEqualToSystemSpacingBelowAnchor:(NSLayoutYAxisAnchor *)anchor multiplier:(CGFloat)multiplier;

Parameters

anchor

The anchor to use as the starting point for the constraint.

multiplier

The multiple of the system spacing to use as the distance between the two anchors.

Return Value

An NSLayoutConstraint object that imposes a specific distance between the current anchor and the object in the anchor parameter.

Discussion

The constraint causes the current anchor to be positioned below the object in the anchor parameter. The distance between the two anchors is determined by multiplying the system spacing by the value in the multiplier parameter. The value of the system spacing is determined from information available from the anchors. For example, if the anchors represent text baselines, the spacing is determined by the fonts used at those baselines.

See Also

Building System Spacing Constraints

- constraintGreaterThanOrEqualToSystemSpacingBelowAnchor:multiplier:

Returns a constraint that defines the minimum distance by which the current anchor is positioned below the specified anchor.

- constraintLessThanOrEqualToSystemSpacingBelowAnchor:multiplier:

Returns a constraint that defines the maximum distance by which the current anchor is positioned below the specified anchor.

Creating Self-Sizing Table View Cells

Create table view cells that support Dynamic Type and use system spacing constraints to adjust the spacing surrounding text labels.