diff --git a/App.swift b/App.swift index 7952d41..ea618a1 100644 --- a/App.swift +++ b/App.swift @@ -5,7 +5,7 @@ import SwiftUI struct TheSwiftWeek: App { var body: some Scene { WindowGroup { - Text("Moin") + BikeView() } } } diff --git a/BikeView.swift b/BikeView.swift index 9a898f4..b77257f 100644 --- a/BikeView.swift +++ b/BikeView.swift @@ -2,12 +2,19 @@ import SwiftUI + struct BikeView: View { + var bike = Bike(name: "Fahrrad", color: "lila") var body: some View { - Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + Text(bike.description) + Text(bike.name) + ForEach(1...5, id: \.self) { number in + Text(bike.color + " " + String(number)) + } + } } -#Preview { +#Preview { BikeView() } diff --git a/TheSwiftWeek.xcodeproj/project.xcworkspace/xcuserdata/rohing73.xcuserdatad/UserInterfaceState.xcuserstate b/TheSwiftWeek.xcodeproj/project.xcworkspace/xcuserdata/rohing73.xcuserdatad/UserInterfaceState.xcuserstate index 697d3da..1bbd38b 100644 Binary files a/TheSwiftWeek.xcodeproj/project.xcworkspace/xcuserdata/rohing73.xcuserdatad/UserInterfaceState.xcuserstate and b/TheSwiftWeek.xcodeproj/project.xcworkspace/xcuserdata/rohing73.xcuserdatad/UserInterfaceState.xcuserstate differ