26.12 Adding the Edit Button Methods
The final task in this tutorial is to add some action methods to be used by the EditButton view added to the navigation bar in the previous section. Because these actions are to be available for every row in the list, the actions must be applied to the list cells as follows:
var body: some View {
NavigationView {
List {
ForEach (carStore.cars) { car in
ListCell(car: car)
}
.onDelete(perform: deleteItems)
...