init(from:by:mode:timing:isAdditive:)
Creates a new action that interpolates from a specified starting transform towards a specified transform, which is relative to the start. Alternatively, interpolates towards the default source if by is not supplied.
Declaration
init(from: Value, by: Value? = nil, mode: FromToByAction<Value>.TransformMode = .default, timing: AnimationTimingFunction = .linear, isAdditive: Bool = false)Parameters
- from:
Transform set at the start of the animation.
- by:
Transform which is used to increment the starting transform. Used to determine the final transform we animate towards. Set this to
nilto animate towards the defaultSource transform. - mode:
Determines what space the transforms are relative to.
- timing:
Controls the progress of the animation.
- isAdditive:
Specifies whether you can additively blend the output from the action’s animation.
Discussion
from → from + by or from → defaultSource