【发布时间】:2021-11-11 14:47:08
【问题描述】:
我有一个List 和Sections:
List {
ForEach((1...3), id: \.self) { _ in
Section(
header: Text("My Section")
.font(.system(.title3))
.fontWeight(.bold)
.foregroundColor(.primary),
content: {
ForEach((1...5), id: \.self) { _ in
Text("My Row")
}
}
)
}
}
这是使用 iOS 14.5 的 iPhone 8 模拟器上的结果:
这里是带有 iOS 15 的 iPhone 8 模拟器上的结果:
我希望 iOS15 列表等于 iOS14.5 之一。我可以通过将.listStyle(PlainListStyle()) 添加到List 来删除水平填充,但该部分的标题仍然具有不同的垂直填充。
有没有办法拥有与 iOS14.5 相同的垂直页眉填充?
环境:
- iOS 15 RC
- XCode 13 RC
【问题讨论】:
标签: ios xcode swiftui ios15 xcode13