From the course: Complete Guide to SwiftUI
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Add and edit recipes
From the course: Complete Guide to SwiftUI
Add and edit recipes
- [Presenter] Okay, the last part of the code I'm going to do, and I'm going to scoot this over so you can see all the names here, is this add, update, and insert. Most of this code is dissimilar to what we've already done, but we have a few extra pieces here because of the way we deal with recipe steps. Again, we have a recipeID. This recipeID tells us what the recipe is, but we also have a bunch of steps for it, which will be in our bindable, and we also have displaySheet, which is saying if this sheet should work or not. This is going to be part of a sheet. We have two more variables I need to talk about, isAction. Again, that's going to flip back and forth between ingredients and action. And the last one here is addAnother, which we'll get to as we get further down the code. Bunch of temporary storage, which as I've talked about before, you have your private state variables that are your actual display values,…
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)
-