不确定你想要它是什么样子,但简单的解决方案可以进入你已经指出的相同方向:
struct ExampleRow: View {
var body: some View {
Text("Example Row")
}
}
struct ContentView: View {
var body: some View {
ZStack {
HStack {
List {
Section(header: Text("Column A")) {
ExampleRow()
ExampleRow()
ExampleRow()
}
}.listStyle(GroupedListStyle())
.disabled(true)
List {
Section(header: Text("Column B")) {
ExampleRow()
ExampleRow()
ExampleRow()
}
}.listStyle(GroupedListStyle())
.disabled(true)
}
Rectangle().fill(Color.gray).opacity(0.4).frame(width: CGFloat(1))
}
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2543 次 |
| 最近记录: |