spring(response:dampingFraction:blendDuration:)
A persistent spring animation. When mixed with other spring() or interactiveSpring() animations on the same property, each animation will be replaced by their successor, preserving velocity from one animation to the next. Optionally blends the response values between springs over a time period.
Declaration
static func spring(response: Double = 0.5, dampingFraction: Double = 0.825, blendDuration: TimeInterval = 0) -> AnimationParameters
- response:
The stiffness of the spring, defined as an approximate duration in seconds. A value of zero requests an infinitely-stiff spring, suitable for driving interactive animations.
- dampingFraction:
The amount of drag applied to the value being animated, as a fraction of an estimate of amount needed to produce critical damping.
- blendDuration:
The duration in seconds over which to interpolate changes to the response value of the spring.
Return Value
A spring animation.
See Also
Customizing spring animations
springspring(_:blendDuration:)spring(duration:bounce:blendDuration:)interactiveSpringinteractiveSpring(response:dampingFraction:blendDuration:)interpolatingSpringinterpolatingSpring(_:initialVelocity:)interpolatingSpring(duration:bounce:initialVelocity:)interpolatingSpring(mass:stiffness:damping:initialVelocity:)