A function defined by a two-dimensional curve that maps an input
progress in the range [0,1] to an output progress that is also in the
range [0,1]. By changing the shape of the curve, the effective speed
of an animation or other interpolation can be changed.
The horizontal (x) axis defines the input progress: a single input
progress value in the range [0,1] must be provided when evaluating a
curve.
The vertical (y) axis maps to the output progress: when a curve is
evaluated, the y component of the point that intersects the input progress
is returned.
Members (12)
get · iOS 17.0+
easeInEaseOut
TypeScript
static get easeInEaseOut(): UnitCurve
Swift declaration
static let easeInEaseOut: UnitCurve
A bezier curve that starts out slowly, speeds up over the middle, then
slows down again as it approaches the end.
The start and end control points are located at (x: 0.42, y: 0) and
(x: 0.58, y: 1).
get · iOS 17.0+
circularEaseIn
TypeScript
static get circularEaseIn(): UnitCurve
Swift declaration
static let circularEaseIn: UnitCurve
A curve that starts out slowly, then speeds up as it finishes.
The shape of the curve is equal to the fourth (bottom right) quadrant
of a unit circle.
get · iOS 17.0+
circularEaseOut
TypeScript
static get circularEaseOut(): UnitCurve
Swift declaration
static let circularEaseOut: UnitCurve
A circular curve that starts out quickly, then slows down as it
approaches the end.
The shape of the curve is equal to the second (top left) quadrant of
a unit circle.
get · iOS 17.0+
circularEaseInOut
TypeScript
static get circularEaseInOut(): UnitCurve
Swift declaration
static let circularEaseInOut: UnitCurve
A circular curve that starts out slowly, speeds up over the middle,
then slows down again as it approaches the end.
The shape of the curve is defined by a piecewise combination of
`circularEaseIn` and `circularEaseOut`.
method · iOS 17.0+
value
TypeScript
value(progress: number): number
Swift declaration
func value(at progress: Double) -> Double
Returns the output value (y component) of the curve at the given time.
- Parameters:
- progress: The input progress (x component). The provided value is
clamped to the range [0,1].
- Returns: The output value (y component) of the curve at the given
progress.
Creates a new curve using bezier control points.
The x components of the control points are clamped to the range [0,1] when
the curve is evaluated.
- Parameters:
- startControlPoint: The cubic Bézier control point associated with
the curve's start point at (0, 0). The tangent vector from the
start point to its control point defines the initial velocity of
the timing function.
- endControlPoint: The cubic Bézier control point associated with the
curve's end point at (1, 1). The tangent vector from the end point
to its control point defines the final velocity of the timing
function.
get · iOS 17.0+
easeIn
TypeScript
static get easeIn(): UnitCurve
Swift declaration
static let easeIn: UnitCurve
A bezier curve that starts out slowly, then speeds up as it finishes.
The start and end control points are located at (x: 0.42, y: 0) and
(x: 1, y: 1).
get · iOS 17.0+
linear
TypeScript
static get linear(): UnitCurve
Swift declaration
static let linear: UnitCurve
A linear curve.
As the linear curve is a straight line from (0, 0) to (1, 1),
the output progress is always equal to the input progress, and
the velocity is always equal to 1.0.
get · iOS 17.0+
easeOut
TypeScript
static get easeOut(): UnitCurve
Swift declaration
static let easeOut: UnitCurve
A bezier curve that starts out quickly, then slows down as it
approaches the end.
The start and end control points are located at (x: 0, y: 0) and
(x: 0.58, y: 1).
get · iOS 17.0+
inverse
TypeScript
get inverse(): UnitCurve
Swift declaration
var inverse: UnitCurve { get }
Returns a copy of the curve with its x and y components swapped.
The inverse can be used to solve a curve in reverse: given a
known output (y) value, the corresponding input (x) value can be found
by using `inverse`:
let curve = UnitCurve.easeInOut
/// The input time for which an easeInOut curve returns 0.6.
let inputTime = curve.inverse.evaluate(at: 0.6)
method · iOS 17.0+
velocity
TypeScript
velocity(progress: number): number
Swift declaration
func velocity(at progress: Double) -> Double
Returns the rate of change (first derivative) of the output value of
the curve at the given time.
- Parameters:
- progress: The input progress (x component). The provided value is
clamped to the range [0,1].
- Returns: The velocity of the output value (y component) of the curve
at the given time.
get · iOS 17.0+
easeInOut
TypeScript
static get easeInOut(): UnitCurve
Swift declaration
static let easeInOut: UnitCurve
A bezier curve that starts out slowly, speeds up over the middle, then
slows down again as it approaches the end.
The start and end control points are located at (x: 0.42, y: 0) and
(x: 0.58, y: 1).