GroupBox
struct · iOS 14.0+ · SDK 27.1
nonisolated struct GroupBox<Label, Content> where Label : View, Content : ViewA stylized view, with an optional label, that visually collects a logical grouping of content. Use a group box when you want to visually distinguish a portion of your user interface with an optional title for the boxed content. The following example sets up a `GroupBox` with the label "End-User Agreement", and a long `agreementText` string in a ``SwiftUI/Text`` view wrapped by a ``SwiftUI/ScrollView``. The box also contains a ``SwiftUI/Toggle`` for the user to interact with after reading the text. var body: some View { GroupBox(label: Label("End-User Agreement", systemImage: "building.columns") ) { ScrollView(.vertical, showsIndicators: true) { Text(agreementText) .font(.footnote) } .frame(height: 100) Toggle(isOn: $userAgreed) { Text("I agree to the above terms") } } } 
Members (0)
This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.
Skipped declarations
7 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
GroupBox.init(content:label:)
callback cannot propagate synchronous failure
GroupBox.body
This protocol needs associated types that cannot yet cross the bridge.
GroupBox.init(content:)
callback cannot propagate synchronous failure
GroupBox.init(_:content:)
callback cannot propagate synchronous failure
GroupBox.init(_:content:)
callback cannot propagate synchronous failure
GroupBox.init(_:content:)
callback cannot propagate synchronous failure
GroupBox.init(label:content:)
callback cannot propagate synchronous failure