init(isInserted:content:label:)
Creates a menu bar extra. The item will be displayed in the system menu bar when the specified binding is set to true. If the user removes the item from the menu bar, the binding will be set to false.
Declaration
init(isInserted: Binding<Bool>, @ViewBuilder content: () -> Content, @ViewBuilder label: () -> Label)Parameters
- isInserted:
Whether the item is inserted in the menu bar. The item may or may not be visible, depending on the number of items present.
- content:
A
Viewto display when the user selects the item. - label:
A
Viewto use as the label in the system menu bar.