Вот что я пытаюсь:
Код: Выделить всё
struct ContentView: View {
var body: some View {
Form {
Section {
Text("Hello!")
Button {
print("Clicked")
} label: {
Text("Click Me!!")
}
}
Section {
VStack {
Button("Button 1") {}
Spacer()
Button("Button 2") {}
}
}
.background(Color.clear) // Not doing anything
Section {
VStack(alignment: .leading) {
Text("Location")
.font(.headline)
Group {
Text("Abc")
Text("Abc")
Text("Abc")
}
.font(.caption)
}
}
}
}
}
[img]https://i.sstatic. net/lY90z.png[/img]
Я пытался добавить .background(Color.clear) в раздел и VStack, но это не имело никакого эффекта. Как этого добиться в SwiftUI?
Подробнее здесь: https://stackoverflow.com/questions/639 ... in-swiftui