29.11 Implementing Add and Edit Buttons
The Add and Edit buttons will be added to a navigation bar applied to the List view in the ContentView layout. The Navigation bar will also be used to display a title at the top of the list. These changes require the use of the navigationBarTitle() and navigationBarItems() modifiers as follows:
var body: some View {
NavigationView {
List {
ForEach (carStore.cars) { car in
ListCell(car: car)
}
}
.navigationBarTitle(Text(...