swiftui-navigation

Route SwiftUI navigation with per-tab stacks and a central router.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/harshav167/build-ios-apps --skill swiftui-navigation-harshav167
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swiftui-navigation
Source: https://github.com/harshav167/build-ios-apps/tree/main/skills/swiftui-navigation
Command: npx skills add https://github.com/harshav167/build-ios-apps --skill swiftui-navigation-harshav167

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building robust SwiftUI navigation across tabs, stacks, sheets, and deep links can be verbose and error-prone; this pattern provides structured routing and reusable patterns.

Core Features & Use Cases

  • Per-tab NavigationStack to preserve independent histories.
  • Centralized route mapping for destinations and modal sheets.
  • Deep links and universal links handling with a router.

Quick Start

Integrate the swiftui-navigation pattern by wiring a per-tab NavigationStack in your app and binding a shared router for destination handling.

Frequently Asked Questions about swiftui-navigation

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

FAQPage Schema
How do I manage independent navigation stacks for each tab in a SwiftUI TabView?

To manage independent navigation stacks for each tab in SwiftUI, bind each tab to its own NavigationStack while routing destinations through a shared router object. This per-tab routing preserves separate user histories across multi-tab interfaces.

What is the best way to handle deep links programmatically in a multi-tab SwiftUI app?

The best way to handle deep links in a multi-tab SwiftUI app is by using a central router to map universal links to specific destinations. This centralized routing ensures consistent navigation transitions across stacks and modal sheets.

Can I route modal sheets and navigation destinations from a single object in SwiftUI?

Yes, you can route modal sheets and navigation destinations from a single shared router object in SwiftUI. Centralized route mapping handles both view stacks and sheet presentations, replacing verbose and error-prone binding logic.

Does this per-tab routing pattern work with multi-column interfaces on iPadOS?

Yes, this per-tab routing pattern works with multi-column interfaces on iPadOS. The central router maps destinations and sheets, supporting complex navigable models and consistent transitions across multi-tab and multi-column layouts.

Why does my SwiftUI navigation history reset when switching between tabs?

Your SwiftUI navigation history resets when switching tabs if tabs do not maintain independent stacks. Implementing per-tab NavigationStacks bound to a central router preserves each tab's independent history and prevents state loss.