Schulung_iOS/TrainView.swift
2025-10-21 13:34:14 +02:00

28 lines
795 B
Swift

import SwiftUI
struct TrainView: View {
var train = Train(name: "RE3412", color: Color.yellow, delay: 2 ){ Bike.trek}
var train2 = Train(name: "RE1423", delay: 1){ Bike(name: "Bulls", price: 1.90, color: Color.red)}
var body: some View {
VStack{
Image(systemName: "train")
// train.color
HStack{
Text(train.localizedStringResource)
BikeView(bike: train.content)
}
// train2.color
}
}
}
#Preview {
TrainView()
}