ScrollPhase
A type that describes the state of a scroll gesture of a scrollable view like a scroll view.
Declaration
@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 scrollPosition(id:anchor:) modifier.
SwiftUI provides you a value of this type when using the onScrollPhaseChange(_:) modifier.
Topics
Getting scroll gesture states
ScrollPhase.animatingScrollPhase.deceleratingScrollPhase.idleScrollPhase.interactingScrollPhase.tracking