This is once again about that Lunch Card app.
There's a section in my app's settings that controls the appearance - color scheme, if you will - of the whole app. The three options are
Here's the code for where the picker is:
There's a section in my app's settings that controls the appearance - color scheme, if you will - of the whole app. The three options are
System Default
Light
Dark
Here's the code for where the picker is:
Code Block struct SettingsView: View { @State private var selectedAppearance = 1 var body: some View { // ... Picker(selection: $selectedAppearance, label: Text("Appearance")) { Button(action: { // Change app color scheme to be auto }) { Text("System Default") }.tag(1) Button(action: { // Change app color scheme to be light }) { Text("Light") }.tag(2) Button(action: { // Change app color scheme to be dark }) { Text("Dark") }.tag(3) } // ... }