---
title: "addLayoutGuide(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiview/addlayoutguide(_:)"
---

# addLayoutGuide(_:)

Adds the specified layout guide to the view.

## Declaration

```swift
func addLayoutGuide(_ layoutGuide: UILayoutGuide)
```

## Parameters

- `layoutGuide`: The layout guide to be added.

## Discussion

Discussion This method adds the specified layout guide to the end of the view’s layoutGuides array. It also assigns the view to the guide’s owningView property. Each guide can have only one owning view. After the guide has been added to a view, it can participate in Auto Layout constraints with that view’s hierarchy.

## See Also

### Working with layout guides

- [layoutGuides](uikit/uiview/layoutguides.md)
- [layoutMarginsGuide](uikit/uiview/layoutmarginsguide.md)
- [readableContentGuide](uikit/uiview/readablecontentguide.md)
- [removeLayoutGuide(_:)](uikit/uiview/removelayoutguide(_:).md)
