---
title: "init(rootView:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/nshostingmenu/init(rootview:)"
---

# init(rootView:)

Creates a hosting menu object that wraps the specified SwiftUI view.

## Declaration

```swift
init(rootView: Content)
```

## Parameters

- `rootView`: The root view of the SwiftUI view hierarchy that you want to present using this menu.
