init(_:duration:spring:startVelocity:)
Creates a new keyframe using the given value and timestamp.
Declaration
init(_ to: Value, duration: TimeInterval? = nil, spring: Spring = Spring(), startVelocity: Value? = nil)Parameters
- to:
The value of the keyframe.
- duration:
The duration of the segment defined by this keyframe, or nil to use the settling duration of the spring.
- spring:
The spring that defines the shape of the segment befire this keyframe
- startVelocity:
The velocity of the value at the start of the segment, or
nilto automatically compute the velocity to maintain smooth motion.