-
-
Save laevandus/8f53678a3c883408b0e1bad60f50b636 to your computer and use it in GitHub Desktop.
This file contains 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
struct ContentView: View { | |
@State private var selection = 1 | |
let items = [0, 1, 2, 3, 4, 5, 6, 7, 8] | |
var body: some View { | |
NavigationStack { | |
Form { | |
CollapsibleWheelPicker(selection: $selection) { | |
ForEach(items, id: \.self) { item in | |
Text("\(item)") | |
} | |
} label: { | |
Text("Cups of Water") | |
Spacer() | |
Text("\(selection)") | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment