From the course: SwiftUI Essential Training
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Subviews with parameters
From the course: SwiftUI Essential Training
Subviews with parameters
- [Instructor] After breaking up our code with extraction, there's several things we have yet to do. Go back over to ContentView, and you'll see that there's a lot of stuff missing. And we actually have one thing that's in the wrong place as well. So let's go over to OrderView, which is the only thing we're seeing. And we saw the HeaderView, and that means that I did something wrong here. And I put HeaderView in the wrong place. It should be its own view. So I'm going to do a Command + X here to cut it. And I'm going to go back into ContentView and put that above OrderView. So that's the first one. Second of all, I've got MenuItemView, which isn't there. So I'm going to have to put MenuItemView in and I'm also going to need to put in the MenuView here. So let's go back into ContentView and then I'm going to just put into those three into play. So we'll do MenuItemView. And there's MenuItemView. And then underneath…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Embed a Stack view6m 29s
-
(Locked)
Text views3m 41s
-
(Locked)
Image views with SF symbols5m 22s
-
(Locked)
Iteration with ForEach5m 13s
-
(Locked)
Images and assets4m 56s
-
(Locked)
Labels2m 22s
-
(Locked)
Add view2m 49s
-
(Locked)
Challenge: Add views26s
-
(Locked)
Solution: Add views2m 33s
-
(Locked)
Extract subviews8m 4s
-
(Locked)
Subviews with parameters6m 37s
-
(Locked)
Challenge: Ratings view44s
-
(Locked)
Solution: Ratings view3m 55s
-
-
-
-
-
-
-
-