One Logo Pool Ball
SwiftUI · IOS API REFERENCE

ScrollTransitionPhase

enum · iOS 17.0+ · SDK 27.1

@frozen enum ScrollTransitionPhase

The phases that a view transitions between when it scrolls among other views. When a view with a scroll transition modifier applied is approaching the visible region of the containing scroll view or other container, the effect will first be applied with the `topLeading` or `bottomTrailing` phase (depending on which edge the view is approaching), then will be moved to the `identity` phase as the view moves into the visible area. The timing and behavior that determines when a view is visible within the container is controlled by the configuration that is provided to the `scrollTransition` modifier. In the `identity` phase, scroll transitions should generally not make any visual change to the view they are applied to, since the transition's view modifications in the `identity` phase will be applied to the view as long as it is visible. In the `topLeading` and `bottomTrailing` phases, transitions should apply a change that will be animated to create the transition.

Members (2)

get · iOS 17.0+

isIdentity

TypeScript
getIsIdentity($self: ScrollTransitionPhase): boolean
Swift declaration
var isIdentity: Bool { get }
get · iOS 17.0+

value

TypeScript
getValue($self: ScrollTransitionPhase): number
Swift declaration
var value: Double { get }

A phase-derived value that can be used to scale or otherwise modify effects. Returns -1.0 when in the topLeading phase, zero when in the identity phase, and 1.0 when in the bottomTrailing phase.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUI types →