In a recent tutorial we covered how to combine views and briefly touched on dynamic cells within a List. In this tutorial we’ll look more closely at how you can bring in dynamic content in to a List.
Create a new project and make sure you select SwiftUI when the option is presented.
Open up ContentView.swift and just below the import line at the top of the file, add the following struct:
struct Message: Identifiable {
var id = UUID()
var from: String
var date: String
var subject: String
var snippet: String
}