<!--
{
  "availability" : [
    "iOS: 6.0.0 - 9.0.0",
    "iPadOS: 6.0.0 - 9.0.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIView/forBaselineLayout()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIView(im)viewForBaselineLayout"
  },
  "title" : "forBaselineLayout()"
}
-->

# forBaselineLayout()

Returns a view used to satisfy baseline constraints.

```
func forBaselineLayout() -> UIView
```

## Return Value

The view the constraint system should use to satisfy baseline constraints

## Discussion

When you make a constraint to a view’s [`NSLayoutAttributeBaseline`](/documentation/UIKit/NSLayoutAttribute/NSLayoutAttributeBaseline) 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 bottom edge.

Override this method to return a text-based subview (for example, [`UILabel`](/documentation/UIKit/UILabel) or a nonscrolling [`UITextView`](/documentation/UIKit/UITextView)). If you override this method, the returned view must be a subview of the receiver. The default implementation returns the receiving view.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)