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.

Use navigation paths

Use navigation paths

- [Instructor] With our navigation paths defined, we can now use them to build a back button. So go over the MenuItemView to start this. And over here we're going to go down towards the bottom, and we'll find the button. And I'll give myself a little more room here. I'm going to close that up as well. Okay, and we've got a button here, and we've got a whole bunch of stuff for this button. I'm going to make sure that I got all of it here. We also have in here some other stuff that we can be using here, which is going to be our modifiers for the button. I'm going to take all of that in here, and I'm going to embed that in HStack. So one end goes here, one end goes after this padding 5 here. And that should get us all of our HStack here. And let me just, for clarification, I'm going to take this button, turn it down here, and do a Control-I on that so we can see the indentation, right? There we go, all right, and I'm going to get rid of some stuff here so we can clean this up and make it…

Contents