One Logo Pool Ball
SwiftUI · IOS API REFERENCE

AnyNavigationTransition

struct · iOS 27.0+ · SDK 27.1

struct AnyNavigationTransition

A type-erasing navigation transition that allows for providing any navigation transition value dynamically. Use this navigation transition when you need to dynamically configure the transition of your content. For example, you could use this in a ``View/sheet(isPresented:onDismiss:content:)`` modifier to dynamically configure how the sheet transitions in and out. This example shows a sheet that uses a different transition based on model state. struct ContentView: View { @State private var showSheet = false @Environment(Model.self) var model var body: some View { VStack { Button("Show Sheet") { showSheet = true } .sheet(isPresented: $showSheet) { let transition = model.useCrossDissolve ? AnyNavigationTransition(.crossFade) : AnyNavigationTransition(.automatic) Text("Sheet Content") .presentationDetents([.medium]) .navigationTransition(transition) } } } }

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

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

AnyNavigationTransition.init(_:)

This parameter hides a concrete Swift type.

All SwiftUI types →