Animation curves & timing
Dec 29, 2023
- We can adjust the animation, like speed.
- We can add a modifier, in most case it will be
Animation.default
1. First, we write the basic code structure of button and animation from previous note.
2. We can change the Animation.default to Animatino.linear, also we can adjust the speed by adding (duration: double)
- We set a timing with 1 second long and put in under duration.
- We have to create extra isAnimating variable for Linear only.
3. We can try different types of animation.
- Ease In, Ease In & Out, Ease Out, and spring.
In most cases, we use Animation.default.
However, it's enjoyable to experiment with different types of animations.
👿 How can I animate all six squares using a single button?
#visionOS #applevisionpro #swiftUI #studying