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.

Solution: Make Home a back button

Solution: Make Home a back button

From the course: Complete Guide to SwiftUI

Solution: Make Home a back button

- [Instructor] There's a lot of ways of doing the solution. Some which don't even need view builders, but we're going to use them anyway. So let's start with a new Swift file. I'm going to go over here. I'm on content view, so I'll click on that or status bar view anywhere over here. So I make sure that I do when I do command end I get the right kind of file and location. And I'm going to hit SwiftUIView down here for the user interface. Next. SwiftUIView is going to become CustomBarView. And then we will check everything here. HuliPizza, correct. HuliPizza, HuliPizza, yeah. We got groups and targets that are all correct. So I'll hit that and I'm now in the right spot. I now have my CustomBarView here. And the first thing I want to do is we're going to be using paths. So we're going to need a NavigationPath here. And then underneath that I'm going to make sure that our CustomBarView has a path. And then we're going to go over to MenuItemView. And here in MenuItemView, I've got two…

Contents