Skip to content

Instantly share code, notes, and snippets.

@Edudjr
Created October 23, 2022 18:47
Show Gist options
  • Save Edudjr/0793482fa4d72cb29c1b5274df3c1c85 to your computer and use it in GitHub Desktop.
Save Edudjr/0793482fa4d72cb29c1b5274df3c1c85 to your computer and use it in GitHub Desktop.
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