From the course: Complete Guide to SwiftUI

Unlock this course with a free trial

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

Stack navigation in lists

Stack navigation in lists

- [Instructor] Where stack navigation becomes very useful is with lists. Our menu is pretty crowded right now. I'm going to use navigation links to push the detail to the device. However, we're going to use a different form, what's called the value destination form, which is a lot more flexible than what we've used so far. This link sets the navigation based on the type of a return value, placing the destination in a modifier. So we're going to start this again in content view. And the menu item view here has been taking up a lot of space and will be better as a separate view. This is what's really known as a detailed view here. And so what we're going to do is we're going to push it as part of the navigation stack. So the first thing we're going to do here is we're going to go here to menu item view. And we're not going to need this here anymore. I also do not need at all these guys, I'm going to go ahead and delete these right here. And then what I'm going to do is I'm going to take…

Contents