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.

Recipe view

Recipe view

- [Instructor] We've selected the recipe and on the next level down we have the RecipeDetailView. Go there next. Once again, if you go to the top here, recipes and steps are bindable, but we also have an ID to identify the recipe. Recipe is the active recipe derived from the ID. If you jump down to the bottom of the code here around line 50, you'll see three lines about it onAppear and onChange. Those go ahead and refresh this recipe based on whatever that recipe ID was that we have up here. Now back over here you'll also see isEditing. IsEditing is our display flag for the editing sheet for the recipe header. Now inside the body here, the body displays the information for the recipe name, the recipe category raw value, the yield, and the unit of measure. Then underneath that we've got detail, which is the RecipeStepsView. So from here I'm going to head over to RecipeStepsView. And if we go to the top of the code…

Contents