init(_:content:)
Creates a menu bar extra with a key for a localized string to use as the label. The extra defines the primary scene of an App.
Declaration
nonisolated init(_ titleKey: LocalizedStringKey, @ViewBuilder content: () -> Content)Parameters
- titleKey:
The title key to use for the label of the item.
- content:
A
Viewto display when the user selects the item.
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.