Animator
-
Manages the application of animations to a value.
See morelet view = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) let sizeAnimator = Animator(initialValue: view.bounds.size) sizeAnimator.onChange = { view.bounds.size = $0 } /// Spring physics will move the view's size to the new value. sizeAnimator.spring(to: CGSize(width: 300, height: 300)) /// Some time in the future... /// The value will keep the same velocity that it had from the preceeding /// animation, and a decay function will slowly bring movement to a stop. sizeAnimator.decay(drag: 2.0)
Declaration
Swift
public final class Animator<Value> where Value : VectorConvertible
-
Timing functions are used to convert linear input time (
See more0.0 -> 1.0
) to transformed output time (also0.0 -> 1.0
).Declaration
Swift
public enum TimingFunction
-
A bezier curve, often used to calculate timing functions.
See moreDeclaration
Swift
public struct UnitBezier : Equatable