constraint(equalToSystemSpacingAfter:multiplier:)
Returns a constraint that defines by how much the current anchor trails the specified anchor.
Declaration
func constraint(equalToSystemSpacingAfter anchor: NSLayoutXAxisAnchor, multiplier: CGFloat) -> NSLayoutConstraintParameters
- 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 trail the object in the anchor parameter. For example, in a left-to-right layout, the current anchor is to the right of anchor, but in a right-to-left layout, it’s to the left of anchor.
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 space is determined from information available from the anchors.