iOS 11 App Development Essentials was published on February 19, 2018. The current revision is 1.0. The revision of your copy of the book can be found in the copyright page at the start of the book.
Section 29.10 - Handling TableView Swipe Gestures
The code in this section can crash due to the a missing call to the reloadData() method of the tableview instance. The code should read as follows:
override func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { let configuration = UISwipeActionsConfiguration(actions: [ UIContextualAction(style: .destructive, title: "Delete", handler: { (action, view, completionHandler) in let row = indexPath.row self.attractionNames.remove(at: row) self.attractionImages.remove(at: row) self.webAddresses.remove(at: row) completionHandler(true) tableView.reloadData() }) ]) return configuration }If you have encountered an error in this book please let us know by contacting our support team at [email protected].