---
title: viewLayoutMarginsDidChange()
framework: uikit
role: symbol
role_heading: Instance Method
path: uikit/uiviewcontroller/viewlayoutmarginsdidchange()
---

# viewLayoutMarginsDidChange()

Called to notify the view controller that the layout margins of its root view changed.

## Declaration

```swift
func viewLayoutMarginsDidChange()
```

## Mentioned in

Displaying and managing views with a view controller

## Discussion

Discussion Use this method to update the position of content based on the new margin values.

## See Also

### Managing the view’s margins

- [Positioning content within layout margins](uikit/positioning-content-within-layout-margins.md)
- [viewRespectsSystemMinimumLayoutMargins](uikit/uiviewcontroller/viewrespectssystemminimumlayoutmargins.md)
- [systemMinimumLayoutMargins](uikit/uiviewcontroller/systemminimumlayoutmargins.md)
