Schulung_iOS/BikeSwipeView.swift
2025-10-22 13:53:50 +02:00

32 lines
633 B
Swift

import SwiftUI
struct BikeSwipeView: TabContent {
static var title = "BikeSwipe"
static var image = "bicycle"
@State var bikes = Bike.all
var body: some View {
VStack{
List {
ForEach(bikes) { bike in
Label(bike.name, systemImage: "bicycle")
.foregroundStyle(.white)
.padding(5)
.background(bike.color)
}.onDelete { bikes.remove(atOffsets: $0)}
}
}
}
}
#Preview {
BikeSwipeView()
}