title: Swift 4, Background color goes white when deleting cell
body: <p>I have found similar questions. None of which solve the same problem I am having.
  This one here: <a href="https://stackoverflow.com/questions/49182311/table-view-cell-background-goes-white-when-deleting-a-cell-ios">Table view cell background goes white when deleting a cell - iOS</a>
  is in objective c. I need a swift answer. </p>
  
  <p>I found this <a href="https://stackoverflow.com/questions/47102469/change-default-background-color-while-deleting-a-row-from-tableview">Change default background color while deleting a row from tableView</a> 
  Answer in swift however when I add this to my code it still does not work. </p>
  
  <p>Here is the code I am using to delete the cell. </p>
  
  <pre><code>    override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -&gt; [UITableViewRowAction]? {
          let delete = UITableViewRowAction(style: .destructive, title: "delete") { (action, indexPath) in
  
              let alertController = UIAlertController(title: "Warning", message: "Are you sure you want to delete this?", preferredStyle: .alert)
              let deleteAction = UIAlertAction(title: "Delete", style: .destructive, handler: { (action) in
                  self.tableView.deleteRows(at: [indexPath], with: .fade)
              })
              alertController.addAction(deleteAction)
  
              let cancelAction = UIAlertAction(title: "Cancel", style: .default, handler: nil)
              alertController.addAction(cancelAction)
  
  
              self.present(alertController, animated: true, completion: nil)
  
          }
          return [delete]
      }
  </code></pre>
  
  <p>I need to maintain the color of the cell as the delete option comes from swiping.</p>
  
  <p>Thanks!</p>