swiftui-nav-ref

Reference SwiftUI navigation APIs across iOS 16-26 versions.

1.1k|81|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/CharlesWiltgen/Axiom --skill swiftui-nav-ref
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-nav-ref
Source: https://github.com/CharlesWiltgen/Axiom/tree/main/.claude-plugin/plugins/axiom/skills/swiftui-nav-ref
Command: npx skills add https://github.com/CharlesWiltgen/Axiom --skill swiftui-nav-ref

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

A comprehensive reference for SwiftUI navigation (NavigationStack, NavigationSplitView, NavigationPath) with deep linking and state restoration patterns.

Core Features & Use Cases

  • NavigationStack, NavigationSplitView, and NavigationPath fundamentals
  • Deep linking, state restoration, and coordinator patterns
  • Cross-platform navigation considerations (iOS 16-26)

Quick Start

Prompt: "Show a sample NavigationStack with a codable NavigationPath."

Frequently Asked Questions about swiftui-nav-ref

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

FAQPage Schema
How do I implement deep linking in SwiftUI with NavigationStack?

Deep linking in SwiftUI uses NavigationPath with codable state to restore navigation hierarchy from URLs. NavigationStack accepts a binding to NavigationPath, enabling you to programmatically push views and persist the navigation state across app launches for complete deep-link support.

What's the difference between NavigationStack and NavigationSplitView?

NavigationStack manages linear navigation hierarchy for single-column layouts, while NavigationSplitView handles multi-column layouts (sidebar, content, detail) across iPad and Mac. Choose NavigationStack for sequential flows and NavigationSplitView for master-detail or three-column interfaces.

How do I preserve state per tab in SwiftUI navigation?

Per-tab state preservation in iOS 18+ uses NavigationStack within each tab alongside Sidebar integration. Store NavigationPath separately for each tab and restore it when the tab reactivates, ensuring independent navigation history and state isolation per tab.

Can I migrate from NavigationView to NavigationStack?

Yes. NavigationView is deprecated in iOS 16+; migrate to NavigationStack for iOS 16 or later, NavigationSplitView for multi-column layouts. NavigationStack provides type-safe path handling, simpler state management, and full support for deep linking compared to NavigationView.

What are common SwiftUI navigation anti-patterns to avoid?

Avoid storing view state in NavigationPath, using non-codable types in paths, managing navigation outside NavigationStack, and ignoring per-tab state isolation. These anti-patterns cause lost state on app relaunch, deep-link failures, and unpredictable navigation behavior.