One Logo Pool Ball
SwiftUICore · IOS API REFERENCE

ScrollPhase

enum · iOS 18.0+ · SDK 27.1

@frozen enum ScrollPhase

A type that describes the state of a scroll gesture of a scrollable view like a scroll view. 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.

Members (2)

get · iOS 18.0+

isScrolling

TypeScript
getIsScrolling($self: ScrollPhase): boolean
Swift declaration
var isScrolling: Bool { get }

Whether the scroll view is actively scrolling. This convenience is equivalent to `phase != .idle`.

get · iOS 18.0+

debugDescription

TypeScript
getDebugDescription($self: ScrollPhase): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUICore types →