答案 0 :(得分:1)
这是简单的演示:
struct DemoListWithButton: View {
var body: some View {
NavigationView {
VStack(alignment: .trailing) {
List(0..<100) { i in
Text("Item \(i)")
}
.navigationBarTitle("Title")
Button("Button") {}
.padding()
}
}
}
}
struct DemoListWithButton_Previews: PreviewProvider {
static var previews: some View {
DemoListWithButton()
}
}