48.3 Building the App
Before adding the widget extension to the project, the first step is to build the basic structure of the app. This will consist of a List view populated with some storm categories which, when selected, will appear in a detail screen.
The detail screen will be declared in a new SwiftUI View file named WeatherDetailView.swift. Within the project navigator panel, right-click on the Shared folder and select the New File… menu option. In the resulting dialog, select the SwiftUI View template option and click on the Next button. Name the file WeatherDetailView.swift before creating the file.
With the WeatherDetailView.swift file selected, modify the view declaration so that it reads as follows:
import SwiftUI
struct WeatherDetailView: View {
var name: String
var icon: String
var body: some View {
&...