---
title: rootView
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/nshostingcontroller/rootview
---

# rootView

The root view of the SwiftUI view hierarchy managed by this view controller.

## Declaration

```swift
@MainActor @preconcurrency var rootView: Content { get set }
```

## See Also

### Getting the root view

- [identifier](swiftui/nshostingcontroller/identifier.md)
