Navigation patterns for SwiftUI apps targeting iOS 26+ with Swift 6.2. Covers push navigation, multi-column layouts, sheet presentation, tab architecture, and deep linking. Patterns are backward-compatible to iOS 17 unless noted.
Use NavigationStack with a NavigationPath binding for programmatic, type-safe push navigation. Define routes as a Hashable enum and map them with .navigationDestination(for:).
Router pattern: For apps with complex navigation, use a router object that owns the path and sheet state. Each tab gets its own router instance injected via .environment(). Centralize destination mapping with a single .navigationDestination(for:) block or a shared withAppRouter() modifier.
Implemente patrones de navegación SwiftUI, incluidos NavigationStack, NavigationSplitView, presentación de hojas, navegación basada en pestañas y enlaces profundos. Úselo al crear navegación push, enrutamiento programático, diseños de varias columnas, hojas modales, barras de pestañas, enlaces universales o manejo de esquemas de URL personalizados. Fuente: dpearson2699/swift-ios-skills.