I tested this code with Xcode 13.2.1. It runs perfectly. Which version of Xcode ? Did you inspect the disgnostics ? let columns: [GridItem] = [GridItem(.flexible()), GridItem(.flexible()), GridItem(.flexible())] struct ContentView: View { var body: some View { LazyVGrid(columns: columns) { ForEach(0..<9) { i in ZStack { Circle() .foregroundColor(.red) .opacity(3) } } } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } Here is screenshot (only difference is ContentView17 vs ContentView).
Topic:
Programming Languages
SubTopic:
Swift
Tags: