Lesson 2 Flashcards

Intro to modifiers

1
Q

Parameters: VStack Alignment types

A

1) .leading
2) .trailing
3) .center

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Parameters: HStack Alignment types

A

1) .top
2) .bottom
3) .center

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what does the VStack alignment types do?

A

changes the horizontal alignment of subviews

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what does the HStack alignment types do?

A

changes the vertical alignment of subviews

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Parameter: Spacing

A

changes the amount of space between elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Spacer()

A

allows elements to grow apart (tall or wide depending on stack) the max amount they can

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

does modifier order matter?

A

YES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

View modifiers

A

.background(), .padding() –> modifiers that change the whole view, wrap the applied view with modification

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

how are view modifiers implemented?

A

modifiers are implemented top to bottom, where each modifier is passed as an instance of the og view (modifying it each time) where once that modifier is applied it will be passed to the next one to build off of that view

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Environment modifiers

A

.font(), .fontWeight(), .foregroundStyle() –> modifiers that wrap around data and change a specific piece

How well did you know this?
1
Not at all
2
3
4
5
Perfectly