ScrollPhaseChangeContext

A type that provides you with more content when the phase of a scroll view changes.

StructureiOS 18.0+macOS 15.0+tvOS 18.0+watchOS 11.0+visionOS 2.0+ScrollPhaseChangeContext in SwiftUI

Declaration

React
type ScrollPhaseChangeContext = { readonly geometry: ScrollGeometry; };
Swift
struct ScrollPhaseChangeContext

Type methods

Properties

  • The geometry of the scroll view at the time of the scroll phase change.

Overview

You don't create this type directly. Instead, SwiftUI provides an instance of this type in the View.onScrollPhaseChange(_:) modifier.

From Apple’s SwiftUI documentation. Code samples there are Swift.

Used by

See also

More in Animation.