0

请帮忙,我有一个使用 CustomView 的视图。在自定义视图中,垂直堆栈中有 2 个列表,这里的问题是即使使用 Spacer,2 个列表之间总是有空格?

struct CustomView: View {
 var body: some View{
        VStack(spacing:0) {
        List(0..<2){ item in
               TestView()
           }
        
        List(0..<2){ item in
               TestView()
           }
       }
    .background(Color.blue)
}

 struct TestView: View {

var body: some View {
    Text("Hello, World!")
        .padding()
        .padding()
   }
}
4

0 回答 0