One Logo Pool Ball
SwiftUI · IOS API REFERENCE

ScrollTargetBehaviorContext

struct · iOS 17.0+ · SDK 27.1

@dynamicMemberLookup struct ScrollTargetBehaviorContext

The context in which a scroll target behavior updates its scroll target.

Members (6)

get · iOS 17.0+

originalTarget

TypeScript
get originalTarget(): _SwiftUICore_ScrollTarget
Swift declaration
var originalTarget: ScrollTarget { get }

The original target when the scroll gesture began.

get · iOS 17.0+

contentSize

TypeScript
get contentSize(): { width: number; height: number }
Swift declaration
var contentSize: CGSize { get }

The size of the content of the scrollable view.

get · iOS 17.0+

containerSize

TypeScript
get containerSize(): { width: number; height: number }
Swift declaration
var containerSize: CGSize { get }

The size of the container of the scrollable view. This is the size of the bounds of the scroll view subtracting any insets applied to the scroll view (like the safe area).

subscript · iOS 17.0+

subscript

TypeScript
subscript(keyPath: SDKHandle): unknown
Swift declaration
subscript<T>(dynamicMember keyPath: KeyPath<EnvironmentValues, T>) -> T { get }
get · iOS 17.0+

axes

TypeScript
get axes(): _SwiftUICore_Axis_Set
Swift declaration
var axes: Axis.Set { get }

The axes in which the scrollable view is scrollable.

get · iOS 17.0+

velocity

TypeScript
get velocity(): { dx: number; dy: number }
Swift declaration
var velocity: CGVector { get }

The current velocity of the scrollable view's scroll gesture.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUI types →