title: How to delete inside a tableView?
body: <p>I have this swift code for an ios app.</p>
  
  <p>I was working on the tableView, in order to make the swipe to the left,in order to delete a list of locations saved by the user.</p>
  
  <p>The part with the questions marks is the critical park and I can't figure out what I have to put or where is the mistake...</p>
  
  <p>Thank you in advance</p>
  
  <pre><code>import UIKit
  import UserNotifications
  
  class PlacesTableViewController: UITableViewController {
    override func viewDidLoad() {
      super.viewDidLoad()
  
  
      NotificationCenter.default.addObserver(
        self,
        selector: #selector(newLocationAdded(_:)),
        name: .newLocationSaved,
        object: nil)
    }
  
    @objc func newLocationAdded(_ notification: Notification) {
      tableView.reloadData()
    }
  
    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return LocationsStorage.shared.locations.count
    }
  
  
  
  
      override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
  
          if editingStyle == .delete{
  
              ???.remove(at: indexPath.row)
              tableView.deleteRows(at: [indexPath], with: .fade)
  
          }
  
      }
  
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      let cell = tableView.dequeueReusableCell(withIdentifier: "PlaceCell", for: indexPath)
      let location = LocationsStorage.shared.locations[indexPath.row]
      cell.textLabel?.numberOfLines = 2
      cell.textLabel?.text = location.description
      cell.detailTextLabel?.text = location.dateString
      return cell
    }
  
    override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -&gt; CGFloat {
      return 110
    }
  }
  </code></pre>