From the course: SwiftUI Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Modifiers in canvas and code

Modifiers in canvas and code

- [Instructor] We've got some elements on our canvas, but they still don't look great. You can change the attributes of these elements with modifiers. You see modifiers here on this globe. They tell the view how to look, in this case, large and in the accent color. So I'm going to go ahead and delete this whole bit right here with the globe and we're going to put some other stuff in there instead. The photo is way too big for the space. Click the library by hitting the plus bar and go to the modifiers button, which is the second one over here. And you'll see it says on top and the search bar modifiers. And you can see there's an awful lot of modifiers here. And I'm going to look for one that says scaled. And you'll see there I've got a scale to fill and scale to fit. Now I'm going to drag this into the image here in my code. And that doesn't really do much. For images, you need to do one more step and I'm going to…

Contents