One Logo Pool Ball
SwiftUICore · IOS API REFERENCE

AnyTransition

struct · iOS 13.0+ · SDK 27.1

@frozen struct AnyTransition

A type-erased transition. - See Also: `Transition`

Members (12)

static · iOS 13.0+

asymmetric

TypeScript
static asymmetric(insertion: AnyTransition, removal: AnyTransition): AnyTransition
Swift declaration
static func asymmetric(insertion: AnyTransition, removal: AnyTransition) -> AnyTransition

Provides a composite transition that uses a different transition for insertion versus removal.

static · iOS 13.0+

move

TypeScript
static move(edge: Edge): AnyTransition
Swift declaration
static func move(edge: Edge) -> AnyTransition

Returns a transition that moves the view away, towards the specified edge of the view.

static · iOS 16.0+

push

TypeScript
static push(edge: Edge): AnyTransition
Swift declaration
static func push(from edge: Edge) -> AnyTransition

Creates a transition that when added to a view will animate the view's insertion by moving it in from the specified edge while fading it in, and animate its removal by moving it out towards the opposite edge and fading it out. - Parameters: - edge: the edge from which the view will be animated in. - Returns: A transition that animates a view by moving and fading it.

get · iOS 13.0+

scale

TypeScript
static get scale(): AnyTransition
Swift declaration
static var scale: AnyTransition { get }

Returns a transition that scales the view.

static · iOS 13.0+

scale

TypeScript
static scaleScaleAnchor(scale: number, anchor?: UnitPoint): AnyTransition
Swift declaration
static func scale(scale: CGFloat, anchor: UnitPoint = .center) -> AnyTransition

Returns a transition that scales the view by the specified amount.

get · iOS 13.0+

slide

TypeScript
static get slide(): AnyTransition
Swift declaration
static var slide: AnyTransition { get }

A transition that inserts by moving in from the leading edge, and removes by moving out towards the trailing edge. - SeeAlso: `AnyTransition.move(edge:)`

static · iOS 13.0+

offset

TypeScript
static offsetXY(x?: number, y?: number): AnyTransition
Swift declaration
static func offset(x: CGFloat = 0, y: CGFloat = 0) -> AnyTransition
static · iOS 13.0+

offset

TypeScript
static offset(offset: { width: number; height: number }): AnyTransition
Swift declaration
static func offset(_ offset: CGSize) -> AnyTransition
get · iOS 13.0+

opacity

TypeScript
static get opacity(): AnyTransition
Swift declaration
nonisolated(unsafe) static let opacity: AnyTransition

A transition from transparent to opaque on insertion, and from opaque to transparent on removal.

method · iOS 13.0+

combined

TypeScript
combined(other: AnyTransition): AnyTransition
Swift declaration
func combined(with other: AnyTransition) -> AnyTransition

Combines this transition with another, returning a new transition that is the result of both transitions being applied.

get · iOS 13.0+

identity

TypeScript
static get identity(): AnyTransition
Swift declaration
static var identity: AnyTransition { get }

A transition that returns the input view, unmodified, as the output view.

method · iOS 13.0+

animation

TypeScript
animation(animation?: (Animation) | null): AnyTransition
Swift declaration
func animation(_ animation: Animation?) -> AnyTransition

Attaches an animation to this transition.

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

AnyTransition.modifier(active:identity:)

This declaration needs Swift generic type arguments. (no canonical witness for E)

AnyTransition.init(_:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

All SwiftUICore types →