Scenario:
I would like to toggle an entity (UIView)'s property;
like a button's color and perhaps other characteristics per @State boolean var.
Button(action: {
self.showActionSheet.toggle()
}) {
Text("Action Sheet")
.foregroundColor(Color.white)
}
.padding()
.background(Color.blue)// how do I toggle this conditionally: i.e. one of two colors?
.cornerRadius(10)
.shadow(radius: 10)
What's the correct way to do this?