25.5 Adding the Second View
Select the File -> New -> File… menu option, this time choosing the SwiftUI View template option and naming the view SecondView. Edit the SecondView.swift file so that it reads as follows:
import SwiftUI
struct SecondView: View {
@StateObject var timerData: TimerData
var body: some View {
VStack {
Text("Second View")
.font(.largeTitle)
Text("Timer Count = \(timerData.timeCount)")
&...