Created
October 23, 2022 18:47
-
-
Save Edudjr/0793482fa4d72cb29c1b5274df3c1c85 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 AnimationSample: View { | |
@State var isAnimating = false | |
var body: some View { | |
Text("Testing") | |
.scaleEffect(isAnimating ? 2 : 1) | |
.foregroundColor(isAnimating ? .red : .green) | |
.onTapGesture { | |
withAnimation { | |
isAnimating = true | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment