swiftui-navigation

Implement SwiftUI navigation patterns with NavigationStack, NavigationSplitView, sheets, tabs, and deep linking.

981|50|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill swiftui-navigation-dpearson2699
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-navigation
Source: https://github.com/dpearson2699/swift-ios-skills/tree/main/skills/swiftui-navigation
Command: npx skills add https://github.com/dpearson2699/swift-ios-skills --skill swiftui-navigation-dpearson2699

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance and code examples for implementing robust and scalable navigation within SwiftUI applications, ensuring a seamless user experience across different platforms and devices.

Core Features & Use Cases

  • NavigationStack: Implement push-style navigation with programmatic routing and type safety.
  • NavigationSplitView: Create adaptive multi-column layouts for iPad and macOS, falling back gracefully to stack navigation on iPhone.
  • Sheet Presentation: Manage modal views using .sheet(item:) for state-driven presentation and control presentation sizing on iOS 18+.
  • Tab-Based Navigation: Structure apps with TabView and independent NavigationStack instances per tab for isolated navigation histories.
  • Deep Linking: Handle Universal Links and custom URL schemes for seamless external routing into the app.
  • Use Case: Building a complex productivity app that requires users to navigate through multiple detail screens, present various modal forms, and support deep linking from emails or web pages.

Quick Start

Implement a basic push navigation flow using NavigationStack and a Hashable enum for routes.

Frequently Asked Questions about swiftui-navigation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement programmatic routing with NavigationStack in SwiftUI?

NavigationSplitView builds adaptive multi-column layouts that fall back gracefully to stack navigation on iPhone. It suits iPad and macOS platforms where master-detail interfaces are needed, ensuring a seamless user experience across different devices.

What's the best way to handle deep linking with Universal Links and custom URL schemes in iOS?

Sheet presentation manages modal views using `.sheet(item:)` for state-driven presentation. You bind a sheet item variable to control presentation and dismissal, and can adjust presentation sizing on iOS 18+ to accommodate different modal form requirements.

Can I use TabView with independent NavigationStack instances for isolated navigation histories?

Yes, TabView structures apps with independent NavigationStack instances per tab to maintain isolated navigation histories. This allows each tab to manage its own routing state so users preserve their context when switching between different feature areas.

Does this SwiftUI navigation approach support iOS 26+ and macOS?

Yes, the navigation patterns support iOS 26+ and macOS platforms. The implementation covers NavigationStack, NavigationSplitView, sheet presentation, tab-based navigation, and deep linking for both operating systems without requiring external dependencies.