【发布时间】:2021-10-22 03:49:37
【问题描述】:
我正在尝试使用 SwiftUI 和 Picker() 获得类似于以下内容的内容
但是当我尝试使用 Section(header: ) 时,我得到以下信息:
Form {
Picker("S", selection: $sensor) {
Section(header: Text("This should be a header")) {
Text("This is the content")
Text("This is more content")
}
Section(header: Text("Another header")) {
Text("This is the content 2")
Text("This is more content 2")
}
}
}
【问题讨论】:
标签: swift xcode swiftui swiftui-list swiftui-form