From the course: Complete Guide to SwiftUI
Unlock this course with a free trial
Join today to access over 24,600 courses taught by industry experts.
Shape modifiers
From the course: Complete Guide to SwiftUI
Shape modifiers
- [Instructor] While we've looked at padding with positive values, I can also use negative numbers here to bring views closer together. So let's go over to menu row view for an example here. So I'm going to go over here to the image and underneath that, I'm going to put padding and I'm going to make it a negative padding to the trailing side. And that might not look really good 'cause we've actually now overlapped the two. But I did it for a reason. You'll use this often along with shapes and shape modifiers. The most common of these is clip shape, which adds a mask to the image. So you can have different shaped images. So for example, above the padding, I'm going to add a clip shape. And it says there's a shape. Now shapes are actually views. And I'm going to put in that view here for circle. And now my image gets cut so that it is a circle and you can only see part of the image and you can see why I now moved it over 'cause you can now use this modifier and I can actually move it…
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)
-
-
-
-
-
-
-
-
-
-
-
-
-