Instance Property

forFirstBaselineLayout

Returns a view used to satisfy first baseline constraints.

Declaration

var forFirstBaselineLayout: UIView { get }

Discussion

For views with multiple rows of text, the first baseline is the baseline for the topmost row.

When you make a constraint to a view’s firstBaseline attribute, Auto Layout uses the baseline of the view returned by this method. If that view does not have a baseline, Auto Layout uses the view’s top edge.

Override this property to return a text-based subview (for example, UILabel or a nonscrolling UITextView). The returned view must be a subview of the receiver. The default implementation returns the value contained by forLastBaselineLayout.

See Also

Aligning Views in Auto Layout

func alignmentRect(forFrame: CGRect)

Returns the view’s alignment rectangle for a given frame.

func frame(forAlignmentRect: CGRect)

Returns the view’s frame for a given alignment rectangle.

var alignmentRectInsets: UIEdgeInsets

The insets from the view’s frame that define its alignment rectangle.

func forBaselineLayout()

Returns a view used to satisfy baseline constraints.

Deprecated
var forLastBaselineLayout: UIView

Returns a view used to satisfy last baseline constraints.