---
title: layout()
framework: webkit
role: symbol
role_heading: Instance Method
path: webkit/webdocumentview/layout()
---

# layout()

Invoked when the receiver should change its layout immediately.

## Declaration

```swift
func layout()
```

## Discussion

Discussion This message is sent to the view as a hint to perform any calculations and update rendering information. For example, at a minimum, the receiver might set the frame rectangle. This method should not perform any drawing operations.

## See Also

### Controlling the layout

- [setNeedsLayout(_:)](webkit/webdocumentview/setneedslayout(_:).md)
