To display numbers in a list with Swift just use this code in ContentView.swift file
List(1...20, id: \.self) { index in
Text("\(index)")
}
To display numbers in a list with Swift just use this code in ContentView.swift file This is the…
This is the result in XCode: