From the course: Complete Guide to SwiftUI

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

NavigationSplitView

NavigationSplitView

- [Instructor] Our app has been using stack view for navigation. There is an alternative to stack view, especially if your users will be using an iPad. Split view navigation creates a parent list and a detailed view to navigate quickly. The way we've embedded the stack view in the app would make this difficult to see, so I'm going to start with a new file in our app. So go ahead and hit Command + N, and we're going to use a new SwiftUI view. Hit that Next button. And we're going to call this SplitViewMenu. And we're in HuliPizza. HuliPizza for the Group and Targets, correct. So we'll just hit Create. Now we're going to need a new menu for this. So let's go ahead and put a menu in. And we're just going to do private var menu = MenuModel().menu. All right, and then we can remove the "Hello, World!" here. And what we'll do is we'll put in a NavigationSplitView that has a closure. And you'll see it's still complaining about…

Contents