20 lines
348 B
Swift
20 lines
348 B
Swift
|
|
|
|
import SwiftUI
|
|
|
|
|
|
struct BikeView: View {
|
|
var bike = Bike(name: "Fahrrad", color: "lila")
|
|
var body: some View {
|
|
Text(bike.description)
|
|
Text(String(describing: bike))
|
|
ForEach(1...5, id: \.self) { number in
|
|
Text(bike.color + " " + String(number))
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
BikeView()
|
|
}
|