Right now, I have a VStack containing a Text, a HStack which contains a few more Texts, and a Divider between them. The problem is that the padding to the top and bottom of the Divider is too much on some smaller devices, making the result look odd. How can I decrease this padding (i.e. make the Texts to the top and bottom appear closer to the line)?
Asked
Active
Viewed 7,403 times
1 Answers
51
It is not a Divider
reason, it is default spacing behavior of VStack, which applies different spacing between different subview types. To disable this make
VStack(spacing: 0) { // or any other constant
and then apply any specific padding for any sub-view.

Martijn Pieters
- 1,048,767
- 296
- 4,058
- 3,343

Asperi
- 228,894
- 20
- 464
- 690