From the course: Complete Guide to SwiftUI
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Grid modifiers
From the course: Complete Guide to SwiftUI
Grid modifiers
- [Instructor] We have a grid, but we also have a few modifiers we can use on the grid. We'd like to align the columns differently. The name should be leading justified and the prices should be trailing justified. We'll use a grid column alignment to do this. If you set it on any element on a column, the entire column justifies. Now I'm going to go do this first of all, on the header. So let's clean this up a little bit. I'm going to close up some stuff. Let's zoom in on the phone near the top so we can now see what we're doing and 'cause this is where we're going to be working for most of what we're doing. And I'm just going to go over here where it says text item right here. And then underneath it, I'm going to put grid column alignment. And then this takes what the alignment is, we're going to use leading on this one, and you can see what happens. Everything all of a sudden now is leading aligned. So it's all on the…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
One more thing51s
-
(Locked)
Observable objects5m 58s
-
(Locked)
Grids6m 7s
-
(Locked)
Grid modifiers5m 10s
-
(Locked)
Forms6m 52s
-
(Locked)
NavigationSplitView6m
-
(Locked)
Previewable3m 38s
-
(Locked)
Three-pane split view navigation8m 28s
-
(Locked)
Beginning Liquid Glass4m 38s
-
(Locked)
Liquid Glass button modifiers6m 54s
-
(Locked)
Background and safe area6m 25s
-
(Locked)
ScrollViews and lazy stacks7m 37s
-
(Locked)
Inspectors6m 39s
-
(Locked)
Menus8m 35s
-
(Locked)
Sheets in Liquid Glass5m 19s
-
(Locked)
Confirmation dialogs2m 51s
-
(Locked)
-
-