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.
Size modifiers
From the course: Complete Guide to SwiftUI
Size modifiers
- [Instructor] You might want some tighter static control on your views. For that, we can size using the frame modifier similar to the frame method from UI kit. In menu item view, let's put the pizza name in an H stack with the image and we're going to use a top alignment to help us understand the dimensions better. So I'm going to just go right above here, menu item view. We've got the image, we've got the text down here for this. And I'm going to pull this out of this V stack. I'm just going to command X this, cut it, and then we're going to go up top here, just below the V stack and I'll paste the text back in and now it's on top. And then what I'll do is command click, embed in an H stack and then I can take the end of the H stack and move it to the end of the image, which is right there at the V stack. And I'm going to do one more thing. This is still kind of hard to read. And so in order for us to get the idea, I'm going to go back up here to our foreground style and I'm going…
Contents
-
-
-
-
-
(Locked)
Presenting views2m 19s
-
(Locked)
Space modifiers2m 54s
-
(Locked)
Shape modifiers3m 54s
-
(Locked)
Text modifiers8m
-
(Locked)
Color modifiers6m 4s
-
(Locked)
Basic backgrounds8m 29s
-
(Locked)
Materials and shadows7m 17s
-
Scale modifiers4m 42s
-
(Locked)
Size modifiers5m 25s
-
(Locked)
Clean up joined views6m 9s
-
(Locked)
Challenge: Clean up OrderView1m 28s
-
(Locked)
Solution: Clean up OrderView8m 36s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-
-
-