From the course: Complete Guide to SwiftUI
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Create navigation paths
From the course: Complete Guide to SwiftUI
Create navigation paths
- [Instructor] While our navigation works, we'd like more polishing and customization, including a more visible back button. To make back buttons, we use a navigation path. Navigation paths keep a sequential collection of our current location in the stack view and all views to get there. So we're going to start here in content view and we're going to declare a navigation path as a state variable. And again, it's going to be a private one, so I can put it under all these rest of these private ones here. We'll call it Path. And it's a navigation path type. And we will set it to an empty path, which is just the initialization navigation path like that. So we've got our path set up now, and then we're going to add the path variable to a whole bunch of places. The first one we're going to do is right here in the navigation stack itself. So we'll say the navigation stack is going to use a path. And from here on in we're going…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
- (Locked) Navigation links3m 57s
- (Locked) Stack navigation in lists5m 58s
- (Locked) Deeper navigation stacks4m 47s
- (Locked) Create navigation paths4m 1s
- (Locked) Use navigation paths6m 7s
- (Locked) More navigation destinations4m 26s
- Toolbars4m 15s
- (Locked) Navigation title5m 22s
- (Locked) List interaction2m 53s
- (Locked)
-
-
-
-
-