From the course: Complete Guide to SwiftUI

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

More navigation destinations

More navigation destinations

- [Instructor] To keep our app consistent, let's now add navigation to order view. This is going to take a few steps. The first step is to make the navigation stack around the order view. So we need again, another navigation stack. I'm just going to go here and put in. So, we're using paths already. I've got to make sure I have a path here. And then, I'm just going to stick one right here. And so, that's our navigation stack. Now, I'm going to use one of two more of our navigation destinations we have available to us, presenting an item. And these work a lot like sheets we've already explored. All three are modifiers. Presenting works on the same Boolean values as sheet, item differs by sending an optional value instead of a bool. If the value is nil, it does not present. When the value goes non nil, it presents. Manipulating the items value to nil will dismiss the view. Where they differ from sheets of course is they got back buttons and navigation bars. Item is likely to be used in…

Contents