본문으로 건너뛰기
cccskills
무료GitHub에 공개

navigation-patterns

SwiftUI navigation architecture patterns including NavigationStack, NavigationSplitView, TabView, programmatic navigation, and custom transitions. Use when reviewing or building navigation, fixing navigation bugs, or architecting app flow.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(6)

  • SKILL.md7.3 KB
  • navigation-split-view.md7.7 KB
  • navigation-stack.md7.2 KB
  • navigation-transitions.md6.5 KB
  • programmatic-navigation.md10.2 KB
  • tab-view.md7.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Navigation Patterns

Comprehensive guide for SwiftUI navigation architecture on iOS, iPadOS, and macOS. Covers the modern navigation APIs (iOS 16+/macOS 13+) with patterns for common and advanced use cases.

When This Skill Activates

  • User is building or reviewing navigation architecture
  • User has navigation-related bugs (stack not updating, back button issues, state loss)
  • User asks about NavigationStack, NavigationSplitView, TabView, or NavigationPath
  • User needs programmatic navigation (push, pop, pop-to-root)
  • User is implementing deep linking that connects to navigation
  • User asks about navigation transitions or animations
  • User is choosing between navigation approaches for their app

Decision Tree

Use this to pick the right navigation container:

What is the app structure?
│
├─ Flat sections (3-5 top-level areas)
│  └─ TabView → see tab-view.md
│
├─ Hierarchical drill-down (list → detail)
│  └─ NavigationStack → see navigation-stack.md
│
├─ Sidebar + content (macOS / iPad)
│  ├─ Two columns → NavigationSplitView → see navigation-split-view.md
│  └─ Three columns → NavigationSplitView → see navigation-split-view.md
│
└─ Combined (tabs with drill-down, sidebar with stacks)
   └─ TabView + NavigationStack per tab
      OR NavigationSplitView + NavigationStack in detail

Quick Reference

PatternContainerMin OSReference
Simple drill-downNavigationStackiOS 16navigation-stack.md
Value-based linksNavigationLink(value:)iOS 16navigation-stack.md
Programmatic push/popNavigationPathiOS 16programmatic-navigation.md
Pop to rootpath = NavigationPath()iOS 16programmatic-navigation.md
State restorationNavigationPath.CodableRepresentationiOS 16programmatic-navigation.md
Two-column layoutNavigationSplitViewiOS 16navigation-split-view.md
Three-column layoutNavigationSplitViewiOS 16navigation-split-view.md
Column visibilityNavigationSplitViewVisibilityiOS 16navigation-split-view.md
Tab barTabViewiOS 13tab-view.md
Customizable tabsTab + TabViewiOS 18tab-view.md
Sidebar tabs (iPad).tabViewStyle(.sidebarAdaptable)iOS 18tab-view.md
Zoom transition.navigationTransition(.zoom)iOS 18navigation-transitions.md
Custom transitionsNavigationTransitioniOS 18navigation-transitions.md

Navigation Design Rules (WWDC22)

The container APIs above decide how navigation is built; these rules decide whether it's designed right.

Tab bars

  • Tabs are top-level content categories, not arbitrary groupings — balance features across tabs so each carries real weight.
  • ❌ Never auto-switch tabs in response to an action taken in another tab — confirm in place instead.

Push vs modal

  • Push (right-to-left) = traversing the app's hierarchy. Modal (slides up — covering the tab bar is by design) = a self-contained task apart from the hierarchy.
  • Modals come in three types: simple task, multi-step task, full-screen content.
  • Limit modals presented over modals — each stacked layer buries the user deeper in transient state.

Wayfinding

  • Nav bar title = the current location; the back button shows the previous screen's title.

The Three Cookbook Recipes (WWDC22)

Nearly every app is one of these three shapes. Pick one per scene, then lift its navigation state.

  1. Pushable stack — NavigationStack(path:) + NavigationLink(value:) + .navigationDestination(for:). Pop-to-root is path.removeAll(); a deep link is just assigning the path.
  2. Multi-column without stacks — NavigationSplitView + List(selection:) in each leading column. Value links auto-drive the next column's selection, so programmatic navigation is setting the selection value.
  3. Split + stack (Photos-style) — NavigationSplitView with a NavigationStack(path:) inside the detail column: sidebar selection picks the collection, the stack drills into it.

Rules that make the recipes hold up:

  • Build with NavigationSplitView even for iPhone-first apps — it auto-collapses to a single stack in compact width, and iPad/Mac layouts come free.
  • Lift navigation state: exactly one bound path/selection per container. That single source of truth is what makes pop-to-root, deep links, and restoration one-line operations.

State restoration: persist through @SceneStorage("navigation") plus a .task that restores once on appear, then streams subsequent path changes back into storage.

Process

1. Identify Navigation Needs

Read the user's code or requirements to determine:

  • App structure (flat, hierarchical, sidebar-based)
  • Target platforms (iOS only, iPad adaptive, macOS)
  • Whether programmatic navigation is needed
  • Deep linking requirements

2. Load Relevant Reference Files

Based on the need, read from this directory:

  • navigation-stack.md — NavigationStack, NavigationLink, navigationDestination
  • navigation-split-view.md — Two/three column layouts, column control, adaptive behavior
  • tab-view.md — TabView, iOS 18 customizable tabs, sidebar mode
  • programmatic-navigation.md — NavigationPath, state restoration, coordinators, pop-to-root
  • navigation-transitions.md — Custom push/pop transitions (iOS 18+)

3. Review or Recommend

Apply patterns from the reference files. Check for common mistakes:

  • Using deprecated NavigationView instead of NavigationStack/NavigationSplitView
  • Using NavigationLink(destination:) instead of NavigationLink(value:) + .navigationDestination
  • Placing NavigationStack in a sidebar/content column of NavigationSplitView (a stack belongs only in the detail column — Recipe 3)
  • .navigationDestination attached inside a lazy container (destination may never register)
  • Missing .navigationDestination registration for a value type
  • NavigationPath not @State or not in the right scope
  • Multiple NavigationStacks competing for the same navigation context
  • Hard-coding navigation instead of using NavigationPath for programmatic control
  • Not handling deep links through the navigation system

4. Cross-Reference

  • For deep linking URL handling, see generators/deep-linking/ skill
  • For navigation animations, see design/animation-patterns/transitions.md
  • For macOS sidebar patterns, see macos/ui-review-tahoe/swiftui-macos.md

References

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Run a structured accessibility audit on an iOS/macOS app — automated XCUITest audits, Accessibility Inspector, manual VoiceOver/Dynamic Type passes, and App Store Accessibility Nutrition Label evaluation. Use before release, when preparing Nutrition Label declarations, or for EU Accessibility Act compliance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rshankras/claude-code-apple-skills8142026년 7월 24일 업데이트

Generate accessibility infrastructure for VoiceOver, Dynamic Type, and accessibility features. Use when improving app accessibility, adding accessibility labels and hints, or auditing compliance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rshankras/claude-code-apple-skills8142026년 7월 24일 업데이트

Generates an Apple-compliant account deletion flow with multi-step confirmation UI, optional data export, configurable grace period, Keychain cleanup, and server-side deletion request. Use when user needs account deletion, right-to-delete, or Apple App Review compliance for account removal.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rshankras/claude-code-apple-skills8142026년 7월 24일 업데이트

Privacy-preserving ad measurement with AdAttributionKit (SKAdNetwork's successor) — install and re-engagement attribution, conversion-value strategy under crowd anonymity, and end-to-end postback testing. Use when running paid acquisition beyond Apple Ads, measuring re-engagement campaigns, designing conversion values, or migrating from SKAdNetwork.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rshankras/claude-code-apple-skills8142026년 7월 24일 업데이트

alarmkit

무료

AlarmKit integration for scheduling alarms and timers with custom UI, Live Activities, and snooze support. Use when implementing alarm or timer features in iOS 26+ apps.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rshankras/claude-code-apple-skills8142026년 7월 24일 업데이트

Interpret app metrics and make data-driven decisions. Covers DAU/MAU, retention, LTV, ARPU, App Store Connect analytics, AARRR funnel analysis, cohort analysis, and diagnostic decision trees. Use when user wants to understand their metrics, diagnose problems, or build a data-driven growth plan.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rshankras/claude-code-apple-skills8142026년 7월 24일 업데이트

rshankras의 스킬 모두 보기

이 스킬의 문제 신고