> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/ios/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/ios/swiftui/view/hierarchy/root-view.md).

# root view

[SwiftUI](/ios/swiftui.md) ⟩ [view](/ios/swiftui/view.md) ⟩ [hierarchy](/ios/swiftui/view/hierarchy.md) ⟩ root view

{% hint style="success" %}
A [view](/ios/swiftui/view.md) <mark style="color:yellow;">in which all other views are placed</mark>. Also known as <mark style="color:purple;">top-level view</mark>, this view <mark style="color:yellow;">sits on top</mark> of a [view hierarchy](/ios/swiftui/view/hierarchy.md) and acts as the [container view](/ios/swiftui/view/hierarchy/container.md) to all [subviews](/ios/swiftui/view/hierarchy/child.md) in the hierarchy.
{% endhint %}

* The <mark style="color:purple;">root view</mark> may contain <mark style="color:yellow;">any number of</mark> [subviews](/ios/swiftui/view/hierarchy/child.md), each of which may contain their own subviews, and so on.

{% tabs %}
{% tab title="👥 相關" %}

* Use a [WindowGroup](/ios/swiftui/app/windows/windowgroup.md) as a [container](/ios/swiftui/view/hierarchy/container.md) for a <mark style="color:purple;">view hierarchy</mark> that your [app](/ios/swiftui/app.md) presents.
  {% endtab %}
  {% endtabs %}
