При добавлении SFSymbol в HStack внутри VStack я получаю странный интервал после HStack. Любые идеи о том, как сохранить нормальный интервал VStack:
Я добавил границы, чтобы вы могли видеть, что происходит
struct ContentView: View {
var body: some View {
VStack {
HStack {
Spacer()
Text( "This is text" )
Spacer()
}
.border( Color.orange, width: 1 )
Text("Hello, World!")
.border( Color.red, width: 1 )
Text("FooBar")
.border( Color.blue, width: 1 )
}
}
}
![enter image description here](https://i.stack.imgur.com/DPYWE.png)
А при добавлении изображения:
struct ContentView: View {
var body: some View {
VStack {
HStack {
Spacer()
Text( "This is text" )
Spacer()
Image( systemName: "chevron.right" )
}
.border( Color.orange, width: 1 )
Text("Hello, World!")
.border( Color.red, width: 1 )
Text("FooBar")
.border( Color.blue, width: 1 )
}
}
}
![enter image description here](https://i.stack.imgur.com/UDBtF.png)