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

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