Created
September 23, 2019 12:16
-
-
Save chriseidhof/55743a3f36ee57085fd80e329c36adc5 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 var prop: Bool = true | |
var body: some View { | |
VStack { | |
Rectangle() | |
.fill(prop ? Color.red : Color.green) | |
.frame(width: prop ? 100 : 300, height: prop ? 50 : 200) | |
.animation(.linear) | |
Spacer() | |
Toggle(isOn: $prop, label: { Text("Toggle") }) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment