The configuration of a scroll transition that controls how a transition
is applied as a view is scrolled through the visible region of a containing
scroll view or other container.
Creates a new configuration that interactively interpolates the
transition's effect as the view is scrolled into the visible region
of the container.
- Parameters:
- timingCurve: The curve that adjusts the pace at which the effect
is interpolated between phases of the transition. For example, an
`.easeIn` curve causes interpolation to begin slowly as the view
reaches the edge of the scroll view, then speed up as it reaches
the visible threshold. The curve is applied 'forward' while the
view is appearing, meaning that time zero corresponds to the
view being just hidden, and time 1.0 corresponds to the pont at
which the view reaches the configuration threshold. This also means
that the timing curve is applied in reversed while the view
is moving away from the center of the scroll view.
- Returns: A configuration that interactively interpolates between
transition phases based on the current scroll position.
get · iOS 17.0+
interactive
TypeScript
static get interactive(): ScrollTransitionConfiguration
Swift declaration
static let interactive: ScrollTransitionConfiguration
Creates a new configuration that interactively interpolates the
transition's effect as the view is scrolled into the visible region
of the container.
get · iOS 17.0+
animated
TypeScript
static get animated(): ScrollTransitionConfiguration
Swift declaration
static let animated: ScrollTransitionConfiguration
Creates a new configuration that discretely animates the transition
when the view becomes visible.
Creates a new configuration that discretely animates the transition
when the view becomes visible.
Unlike the interactive configuration, the transition isn't
interpolated as the scroll view is scrolled. Instead, the transition
phase only changes once the threshold has been reached, at which
time the given animation is used to animate to the new phase.
- Parameters:
- animation: The animation to use when transitioning between states.
- Returns: A configuration that discretely animates between
transition phases.
get · iOS 17.0+
identity
TypeScript
static get identity(): ScrollTransitionConfiguration
Swift declaration
static let identity: ScrollTransitionConfiguration
Creates a new configuration that does not change the appearance of the view.
Sets the animation with which the transition will be applied.
If the transition is interactive, the given animation will be used
to animate the effect toward the current interpolated value, causing
the effect to lag behind the current scroll position.
- Parameter animation: An animation that will be used to apply the
transition to the view.
- Returns: A copy of this configuration with the animation set to the
given value.
Sets the threshold at which the view will be considered fully visible.
- Parameters:
- threshold: The threshold specifying how much of the view must
intersect with the container before it is treated as visible.
- Returns: A copy of this configuration with the threshold set to the
given value.