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.
Add navigation
From the course: Complete Guide to SwiftUI
Add navigation
- [Instructor] We got the ingredients in place and it's time to add the recipes. As I'm running these as independent views, tab views makes sense to navigate between them. So let's head over to Main here, and we can close up Ingredients, and we can head over here to Content View. And we can see what's going on here. Couple things to start with is the source of all our models. You can see right here we've got the bindable ingredients and we have two State variables for Recipes and RecipeSteps. Again, all of these are observable, so I can just go straight into stuff from state and bindable, but why did I put this one as bindable? Let's go over one step over here to Davids Grinds app. And you can see in here I made this an environment. So we have an environment variable here set up. So I made the state variable here and then I said this content view here, I'm going to make this environment. So, but I'm going to go back into environment here. I started it as bindable, but there are places…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Introducing the capstone project2m 55s
-
(Locked)
The model schema2m 10s
-
(Locked)
Add model to project1m 47s
-
(Locked)
The model implementation5m 2s
-
A dual key model6m 12s
-
(Locked)
Styles4m 38s
-
(Locked)
Code custom controls4m 38s
-
(Locked)
Ingredients view4m 36s
-
(Locked)
Add navigation3m 31s
-
(Locked)
Recipe view5m 33s
-
(Locked)
Add and edit recipes5m 8s
-
(Locked)
Testing6m 54s
-
(Locked)
-