MenuControlGroupStyle
A control group style that presents its content as a menu when the user presses the control, or as a submenu when nested within a larger menu
Platform Compatibility
Tags
SwiftUI Code
VStack {
ControlGroup {
Button("Increase", systemImage: "plus", action: action)
Button("Decrease", systemImage: "minus", action: action)
} label: {
Text("Foo")
}
ControlGroup("Foo", systemImage: "magnifyingglass") {
Button("Increase", systemImage: "plus", action: action)
Button("Decrease", systemImage: "minus", action: action)
}
ControlGroup {
Button("Increase", systemImage: "plus", action: action)
Button("Decrease", systemImage: "minus", action: action)
}
}
.controlGroupStyle(.menu)Found an issue or have a suggestion?
More ControlGroup Components
View allCompactMenuControlGroupStyle
A control group style that presents its content as a compact menu when the user presses the control, or as a submenu when nested within a larger menu
Explore Other Components
Browse allCustom Phases Async URL Image
Loads and displays a modifiable image from the specified URL load request in phases.
ToolbarItem Shared Background Visibility
Controls the visibility of the glass background effect on items in the toolbar. In certain contexts, such as the navigation bar on iOS and the window toolbar on macOS, toolbar items will be given a glass background effect that is shared with other items in the same logical grouping
Button Styles
A type that applies standard interaction behavior and a custom appearance to all buttons within a view hierarchy
Custom Icon Store View
Creates a view to load a collection of products from the App Store using product identifiers, and merchandise them using a custom image.