Contents

init(content:label:)

Creates a menu bar extra that will be displayed in the system menu bar, and defines the primary scene of an App.

Declaration

init(@ViewBuilder content: () -> Content, @ViewBuilder label: () -> Label)

Parameters

  • content:

    A View to display when the user selects the item.

  • label:

    A View to use as the label in the system menu bar.

Discussion

When this item is removed from the system menu bar by the user, the application will be automatically quit. As such, it should not be used in conjunction with other scene types in your App.

See Also

Creating a menu bar extra