【发布时间】:2020-10-18 13:58:54
【问题描述】:
我有一个 List 包含一个 TextEditor
struct ContentView: View {
@State var text: String = "test"
var body: some View {
List((1...10), id: \.self) { _ in
TextEditor(text: $text)
}
}
}
但它的项目并没有随着TextEditor 的高度变化而增长。我试过 .fixedSize() 修饰符但没有运气。我在这里错过了什么?
【问题讨论】: