这是我的代码:
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")
}
}
}
}
}
问题是我无法以相同的方式让section header的两行对齐或对齐。我希望它们都左对齐,但是我也希望它们都以屏幕为中心。实际上,对齐方式很奇怪,如下所示:
任何建议将不胜感激。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句