32.3 Creating the GridDemo Project
Launch Xcode and select the option to create a new Multiplatform App project named GridDemo. Once the project has been created, edit the ContentView.swift file to add a custom view to act as grid cell content together with an array of colors to make the grid more visually appealing:
import SwiftUI
struct ContentView: View {
private var colors: [Color] = [.blue, .yellow, .green]
.
.
struct CellContent: View {
var index: Int
var color: Color
var body: some View {
Text("\(index)")
...