I'm trying a lot of different ways, using padding(), spacer(), frame()
modifiers but can't get what I want.
Essentially, I would like for the Stack to have a uniform Look w/ the same font sizes across all labels/values. As can see from the pic, the distance label/value ends up being smaller. (Where should I place the minScaleFactor()
for it to effect the entire HStack?)
My Goal is
- Have all the values/labels shown in it's entirety
- Adjust the spacing between each HStack to be the same
- Have
MinScaleFactor()
apply to all the values/labels so that they appear uniform.
Unfortunately, I'm just not getting it. :-(
var body: some View {
HStack (spacing: 15) {
VStack(alignment: .leading){
Text("Load")
Text("24533")
}
.padding(.leading, 10)
VStack(alignment: .leading) {
Text("Time")
Text("99h 44m 05s")
}
VStack(alignment: .leading) {
Text("Dist")
Text("999999.00km")
}
VStack(alignment: .leading) {
Text("D+")
Text("100000m")
}
VStack(alignment: .leading) {
Text("Calories")
Text("1000000033333")
}
VStack(alignment: .leading) {
Text("Joules")
Text("111111")
}
}
.frame(maxWidth: .infinity, alignment: .leading)
.minimumScaleFactor(0.2)
.lineLimit(1)
.font(.subheadline)
.border(Color.blue, width: 3)
}
With the suggestion to add a Spacer in between the 2 texts