Skip to content

Instantly share code, notes, and snippets.

@laevandus
Last active June 21, 2023 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laevandus/8f53678a3c883408b0e1bad60f50b636 to your computer and use it in GitHub Desktop.
Save laevandus/8f53678a3c883408b0e1bad60f50b636 to your computer and use it in GitHub Desktop.
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