这是我的代码:
Form {
Section {} // regular section no background
Section { // <--- want this section to have a background color
Text("Hello")
}
.background(Gradient(colors: [.teal, .cyan, .green]).opacity(0.6))
} // Do not want background on form only on an individual section
这只在文本()上添加背景,这是有道理的,但如何让它仅在部分应用背景