List() {
ForEach(landmarkData) { landmark in
LandmarkRow(landmark: landmark).onTapGesture {
self.showingAlert = true
}.alert(isPresented: self.$showingAlert) {
Alert(title: Text(landmark.name),
message: Text(landmark.park),
dismissButton: .default(Text("OK")))
}
}.onDelete(perform: deleteRow)
}
网友评论