Working with lists in SwiftUI
Back at WWDC 2019, Apple unveiled to the world a brand-new UI framework called SwiftUI. Built from the ground up, SwiftUI is a powerful alternative to UIKit and AppKit, offering developers the ability to write code using declarative syntax.
In this section, we are going to cover what SwiftUI has to offer in terms of generating lists and what we may need to do going forward should we require the use of anything that isn't available to use just yet.
Creating our first SwiftUI project
For this, we're going to need to create a new single view app, the same as before, but only this time we'll need to select SwiftUI for our user interface, as highlighted in the following screenshot:
If you're unfamiliar with SwiftUI, you'll notice a couple of differences. You'll no longer have a ViewController.swift
file – this has been replaced with ContentView.swift...