ScrollPhase
A type that describes the state of a scroll gesture of a scrollable view like a scroll view.
Declaration
type ScrollPhase = SwiftOpaque<'ScrollPhase'>;@frozen enum ScrollPhaseOverview
A scroll gesture can be in one of four phases:
- idle: No active scroll is occurring.
- panning: An active scroll being driven by the user
is occurring.
- decelerating: The user has stopped driving a scroll
and the scroll view is decelerating to its final
target.
- animating: The system is animating to a final target
as a result of a programmatic animated scroll from
using a ScrollViewReader or
View.scrollPosition(id:anchor:) modifier.
SwiftUI provides you a value of this type when using the
View.onScrollPhaseChange(_:) modifier.
From Apple’s SwiftUI documentation. Code samples there are Swift.
Used by
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.