From the course: SwiftUI Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Subviews with parameters

Subviews with parameters

- [Instructor] After breaking up our code with extraction, there's several things we have yet to do. Go back over to ContentView, and you'll see that there's a lot of stuff missing. And we actually have one thing that's in the wrong place as well. So let's go over to OrderView, which is the only thing we're seeing. And we saw the HeaderView, and that means that I did something wrong here. And I put HeaderView in the wrong place. It should be its own view. So I'm going to do a Command + X here to cut it. And I'm going to go back into ContentView and put that above OrderView. So that's the first one. Second of all, I've got MenuItemView, which isn't there. So I'm going to have to put MenuItemView in and I'm also going to need to put in the MenuView here. So let's go back into ContentView and then I'm going to just put into those three into play. So we'll do MenuItemView. And there's MenuItemView. And then underneath…

Contents