Objetivo
Obtener datos para mostrar en un scrollView
Resultado Esperado

Resultado actual

Alternativa
uso List, pero no es flexible (no puede eliminar separadores, no puede tener varias columnas)
Código
struct Object: Identifiable {
var id: String
}
struct Test: View {
@State var array = [Object]()
var body: some View {
// return VStack { // uncomment this to see that it works perfectly fine
return ScrollView(.vertical) {
ForEach(array) { o in
Text(o.id)
}
}
.onAppear(perform: {
self.array = [Object(id: "1"),Object(id: "2"),Object(id: "3"),Object(id: "4"),Object(id: "5")]
})
}
}
return
printdeclaración antes, de ahí elreturn