Created
May 4, 2024 11:06
-
-
Save ppeelen/ecc147a93cdabfb48c81a133112f4edb to your computer and use it in GitHub Desktop.
The result of the GeneralSettingsView swift file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct GeneralSettingsView: View { | |
@State private var settingOneValue = false | |
@State private var settingTwoValue = false | |
@State private var settingThreeValue = false | |
var body: some View { | |
Form { | |
Section { | |
Toggle(isOn: $settingOneValue, label: { | |
VStack(alignment: .leading) { | |
Text("Title") | |
.font(.title2) | |
Text("Subtitle for the setting, explaining what it does") | |
} | |
}) | |
} header: { | |
Text("Section 1") | |
} | |
Section { | |
Toggle(isOn: $settingTwoValue, label: { | |
VStack(alignment: .leading) { | |
Text("Title 2") | |
.font(.title2) | |
Text("Subtitle for the setting, explaining what it does") | |
} | |
}) | |
Toggle(isOn: $settingThreeValue, label: { | |
VStack(alignment: .leading) { | |
Text("Title 3") | |
.font(.title2) | |
Text("Subtitle for the setting, explaining what it does") | |
} | |
}) | |
} header: { | |
Text("Section two") | |
} | |
} | |
.formStyle(.grouped) | |
.frame(width: 800, height: 600) | |
} | |
} | |
#Preview { | |
GeneralSettingsView() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment