navigation-patterns

Documents navigation architecture patterns for SwiftUI apps using WebView, MapKit, and other tools.

114|8|Updated Mar 4, 2025
One-click install
npx skills add https://github.com/gustavscirulis/snapgrid --skill navigation-patterns-gustavscirulis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: navigation-patterns
Source: https://github.com/gustavscirulis/snapgrid/tree/main/.claude/skills/skills/ios/navigation-patterns
Command: npx skills add https://github.com/gustavscirulis/snapgrid --skill navigation-patterns-gustavscirulis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers build robust and intuitive navigation experiences in SwiftUI applications, addressing common architectural challenges and bugs.

Core Features & Use Cases

  • Modern Navigation APIs: Covers NavigationStack, NavigationSplitView, and TabView for iOS, iPadOS, and macOS.
  • Programmatic Control: Guides on using NavigationPath for deep linking and complex navigation flows.
  • Use Case: When encountering issues like a broken back button, state loss during navigation, or needing to implement complex deep linking, this Skill provides the patterns and solutions to fix or architect the navigation correctly.

Quick Start

Use the navigation-patterns skill to understand how to implement a two-column layout using NavigationSplitView.

Frequently Asked Questions about navigation-patterns

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

FAQPage Schema
How do I fix a broken back button or state loss in SwiftUI navigation?

SwiftUI navigation bugs like broken back buttons and state loss are resolved by adopting modern architecture patterns using NavigationStack and programmatic path binding to properly manage view state.

What is the best way to implement programmatic deep linking in a SwiftUI app?

Programmatic deep linking in SwiftUI is best implemented using NavigationPath within a NavigationStack to precisely control the navigation stack and push specific views dynamically based on incoming data.

How do I build a two-column layout for iPadOS using SwiftUI?

You can build a two-column layout for iPadOS by implementing NavigationSplitView in SwiftUI, which manages the sidebar and detail view architecture natively across iOS, iPadOS, and macOS.

Does NavigationStack work with older iOS versions before iOS 16?

NavigationStack does not work with iOS versions before iOS 16, as it requires modern SwiftUI navigation APIs introduced from iOS 16 onwards to replace the older NavigationView architecture.

Why does my TabView lose its navigation state when switching tabs in SwiftUI?

TabView loses navigation state when switching tabs if the navigation architecture is not properly retained, requiring each tab to maintain its own NavigationStack to preserve the navigation path independently.