let Columns: [GridItem] = [
GridItem(.flexible(), spacing: nil, alignment: nil),
GridItem(.flexible(), spacing: nil, alignment: nil),
]
var body: some View {
LazyVGrid(columns: /*@START_MENU_TOKEN@*//*@PLACEHOLDER=Columns@*/[GridItem(.fixed(200))]/*@END_MENU_TOKEN@*/) {
ScrollView{
ForEach(0..<20) { index in
Rectangle()
.frame(height:150)
}
}
}
}
字符串
我期望两个矩形,但我只能看到一个出现在屏幕上
1条答案
按热度按时间oyt4ldly1#
试试这个,把
ScrollView
放在LazyVGrid
之前:字符串