---
title: forFirstBaselineLayout
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiview/forfirstbaselinelayout
---

# forFirstBaselineLayout

Returns a view used to satisfy first baseline constraints.

## Declaration

```swift
var forFirstBaselineLayout: UIView { get }
```

## Discussion

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 NSLayoutConstraint.Attribute.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. note: If the same subview is appropriate for both the first and last baseline, you only need to override the forLastBaselineLayout getter method.

## See Also

### Aligning views in Auto Layout

- [alignmentRect(forFrame:)](uikit/uiview/alignmentrect(forframe:).md)
- [frame(forAlignmentRect:)](uikit/uiview/frame(foralignmentrect:).md)
- [alignmentRectInsets](uikit/uiview/alignmentrectinsets.md)
- [forLastBaselineLayout](uikit/uiview/forlastbaselinelayout.md)
