Last active
August 30, 2020 00:46
-
-
Save laevandus/917e1de6eb06e7e4cae6d957c00522c7 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
@State private var selectedPlanet = "" | |
let planets = ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Neptune", "Uranus"] | |
func makePlanetPicker() -> some View { | |
Picker("Planets", selection: $selectedPlanet) { | |
ForEach(planets, id: \.self) { planet in | |
Text(planet) | |
}.navigationBarTitle("Planets") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment