问题描述
这是我的代码:
struct ContentView: View {
var body: some View {
Form {
Section(header:
vstack {
Text("Header line 1")
Text("This is header line 2")
}) {
List {
Text("Item 1")
Text("Item 2")
Text("Item 3")
Text("Item 4")
}
}
}
}
}
问题是我无法让节标题的两行以相同的方式对齐或对齐。我更喜欢它们都是左对齐的,但我也会让它们都居中在屏幕上。原来,对齐方式很奇怪,如下图:
任何建议将不胜感激。