Given the following code, how can you dismiss the ColorPicker in live previews or in the simulator? Currently, the ColorPicker displays fine, allows me to select different colors, but I cannot figure out how to dismiss it.
struct ContentView: View {
@State private var bgColor = Color.white
var body: some View {
VStack {
ColorPicker("Color picker", selection: $bgColor)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
Group {
ContentView()
}
}
}
Post
Replies
Boosts
Views
Activity
I am looking for an API with information on which Apple stores are open in certain areas. Yelp's API does not provide accurate information, and I believe Google Maps costs money to use the search feature.