Created
October 24, 2022 01:31
-
-
Save Edudjr/a3554b19967216bfa233ecad8285bee9 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 displaySheet = false | |
@State var shake = false | |
var body: some View { | |
Text("Shake Me") | |
.font(.title) | |
.onTapGesture { | |
shake = true | |
} | |
.shake($shake) { | |
displaySheet = true | |
} | |
.sheet(isPresented: $displaySheet) { | |
Text("Another view!") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment