Я создал приложение с SwiftUI. Я использовал этот код для компоновки моего представления
struct ContentView: View {
var body: some View {
List(0 ..< 5) { item in
VStack {
Text("Hello World")
.font(.largeTitle)
.fontWeight(.bold)
.foregroundColor(Color.red)
Image("Hello")
.aspectRatio(contentMode: .fit)
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
, но VStack не подходит для contentView
![enter image description here](https://i.stack.imgur.com/MjYQA.png)