Skip to main content

Introduction to navigation

About 2 minSwiftSwiftUIArticle(s)bloghackingwithswift.comcrashcourseswiftswiftuixcodeappstore

Introduction to navigation 관련

SwiftUI by Example

Back to Home

Introduction to navigation | SwiftUI by Example

Introduction to navigation

Updated for Xcode 15

Navigation sits at the heart of so many apps, and SwiftUI does a great job of making it easy out of the box. This means we get a simple and natural approach using NavigationLink, full control over programmatic navigation using Navigationpath, support for two- and three-view layout with NavigationSplitView, and more.

This means a lot of the time you can forget about the easier stuff and focus on the parts that need more thought, such as:

  • Making customizable toolbars with sensible defaults
  • Saving and loading your user's navigation with state restoration
  • Deciding when and how to show a sidebar, or adding an extra content view if needed.
  • Combining NavigationSplitView and NavigationStack to get exactly the structure you want.

These aren't necessarily hard, they just take more planning to get right.

Similar solutions…
How to use programmatic navigation in SwiftUI | SwiftUI by Example

How to use programmatic navigation in SwiftUI
How to preview your layout in a navigation view | SwiftUI by Example

How to preview your layout in a navigation view
How to embed a view in a navigation view | SwiftUI by Example

How to embed a view in a navigation view
How to hide the tab bar, navigation bar, or other toolbars | SwiftUI by Example

How to hide the tab bar, navigation bar, or other toolbars
How to add bar items to a navigation view | SwiftUI by Example

How to add bar items to a navigation view

이찬희 (MarkiiimarK)
Never Stop Learning.