You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Defines the animation values for horizontal offset.
offsetY
AnimationValue<CGFloat>
Defines the animation values for vertical offset.
rotation
AnimationValue<Double>
Defines the animation values for rotation.
scale
AnimationValue<Double>
Defines the animation values for scaling.
blur
AnimationValue<Double>
Defines the animation values for blur effect.
delay
Double
Determines the delay before each animation starts.
animation
Animation
Set to your desired animation type.
maxAnimationCount
Int
Maximum number of animations to play.
If set to 20, animations play up to the 20th item (index 19) according to the delay.
The 21st and subsequent items will animate simultaneously with the 21st.
This prevents excessive delays when animating large sets of data.
For example, without this option, you would need to wait delay * 99 seconds to see the 100th item.
AnimationStyle Preset
vardelay:Double=0.05,varanimation: Animation =.bouncy(duration:0.4),varmaxAnimationCount: Int =20extensionAnimationStyle{varconfig:AnimationConfig{switchself{case.`default`:returnAnimationConfig(opacity:.init(from:0,to:1),offsetX:.init(from:0,to:0),offsetY:.init(from:50,to:0),rotation:.init(from:0,to:0),scale:.init(from:1.0,to:1.0),blur:.init(from:0,to:0))case.grid:returnAnimationConfig(opacity:.init(from:0,to:1),offsetX:.init(from:0,to:0),offsetY:.init(from:100,to:0),rotation:.init(from:0,to:0),scale:.init(from:1.3,to:1.0),blur:.init(from:8,to:0))case.list:returnAnimationConfig(opacity:.init(from:0,to:1),offsetX:.init(from:50,to:0),offsetY:.init(from:0,to:0),rotation:.init(from:0,to:0),scale:.init(from:1.1,to:1.0),blur:.init(from:0,to:0))}}}
About
AnimationKit simplifies sequential animations in iOS and macOS apps with SwiftUI.