UnitCurve
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.
Declaration
type UnitCurve =
| 'circularEaseIn'
| 'circularEaseInOut'
| 'circularEaseOut'
| 'easeIn'
| 'easeInEaseOut'
| 'easeInOut'
| 'easeOut'
| 'linear'
| { bezier: { startControlPoint: UnitPoint; endControlPoint: UnitPoint; }; };struct UnitCurvePass a literal, or build one with SwiftUI.UnitCurve from import { SwiftUI } from 'swiftui-react-native'.
Type properties
'circularEaseIn'SwiftUI.UnitCurve.circularEaseInA curve that starts out slowly, then speeds up as it finishes.
'circularEaseInOut'SwiftUI.UnitCurve.circularEaseInOutA circular curve that starts out slowly, speeds up over the middle, then slows down again as it approaches the end.
'circularEaseOut'SwiftUI.UnitCurve.circularEaseOutA circular curve that starts out quickly, then slows down as it approaches the end.
'easeIn'SwiftUI.UnitCurve.easeInA bezier curve that starts out slowly, then speeds up as it finishes.
'easeInEaseOut'SwiftUI.UnitCurve.easeInEaseOutA bezier curve that starts out slowly, speeds up over the middle, then slows down again as it approaches the end.
'easeInOut'SwiftUI.UnitCurve.easeInOutA bezier curve that starts out slowly, speeds up over the middle, then slows down again as it approaches the end.
'easeOut'SwiftUI.UnitCurve.easeOutA bezier curve that starts out quickly, then slows down as it approaches the end.
'linear'SwiftUI.UnitCurve.linearA linear curve.
Type methods
Overview
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.
From Apple’s SwiftUI documentation. Code samples there are Swift.
See also
More in Animation.
- AnimationThe way a view changes over time to create a smooth visual transition from one state to another.
- AnimationChainAnimation with chained calls: SwiftUI.Animation.delay(...).
- AnimationCompletionCriteriaThe criteria that determines when an animation is considered finished.
- AnimationTimelineScheduleA pausable schedule of dates updating at a frequency no more quickly than the provided interval.
- AnyTransitionA type-erased transition.
- AnyTransitionChainAnyTransition with chained calls: SwiftUI.AnyTransition.animation(...).
- BlurReplaceTransitionA transition that animates the insertion or removal of a view by combining blurring and scaling effects.
- BlurReplaceTransitionConfigurationConfiguration properties for a transition.
- ContentTransitionA kind of transition that applies to the content within a single view, rather than to the insertion or removal of a view.
- DropSessionPhaseThe phase of the current drop session.
- GlassEffectTransitionA structure that describes changes to apply when a glass effect is added or removed from the view hierarchy.
- IdentityTransitionA transition that returns the input view, unmodified, as the output view.