---
title: "realityViewLayoutBehavior(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/realityviewlayoutbehavior(_:)"
---

# realityViewLayoutBehavior(_:)

A view modifier that controls the frame sizing and content alignment behavior for RealityView

## Declaration

```swift
@MainActor @preconcurrency func realityViewLayoutBehavior(_ layoutOption: RealityViewLayoutOption) -> some View

```

## Discussion

Discussion This modifier is only accounted for after the end of the make closure. It isn’t checked on any calls to the update closure. struct ModelWrapperView: View {     let modelName: String     var body: some View {         RealityView { content in             let model = try? await Entity(named: modelName)             if let model {                 content.add(model)             }         }         .realityViewLayoutBehavior(.fixedSize)     } } See RealityViewLayoutOption for a list of options to pass into realityViewLayoutBehavior(_:).

## See Also

### Configuring camera controls

- [realityViewCameraControls](swiftui/environmentvalues/realityviewcameracontrols.md)
- [realityViewCameraControls(_:)](swiftui/view/realityviewcameracontrols(_:).md)
