DEV Community

Liang Wang
Liang Wang

Posted on

GroupBox

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")
        }
    }
}

Enter fullscreen mode Exit fullscreen mode

Link: https://developer.apple.com/documentation/swiftui/groupbox

Top comments (0)