title: Cannot get swipe to delete on UITableView cell
body: <p>I am trying to get a cell &quot;swipe to delete&quot; action on a cell.</p>
  <p>as I've read adding func tableView(
  _ tableView: UITableView,
  commit editingStyle: UITableViewCell.EditingStyle,
  forRowAt indexPath: IndexPath
  ){} method should help, but adding it does nothing.</p>
  <p>I've also tried adding canEditRowAt method that always returns true, and implementing editActionsForRowAtIndexPath. but the result is always same the I slide the cell on a simulator nothing happens.</p>
  <pre><code>class CheckListViewController: UIViewController {
      private lazy var items = getListItems() // model
      
      let contactsTableView = UITableView()
      
      override func viewDidLoad() {
          super.viewDidLoad()
          view.backgroundColor = .white
  
          contactsTableView.dataSource = self
          contactsTableView.delegate = self
          
          contactsTableView.register(CategoryListCell.self, forCellReuseIdentifier: &quot;contactCell&quot;)
  
          view.addSubview(contactsTableView)
          
          contactsTableView.translatesAutoresizingMaskIntoConstraints = false
          contactsTableView.topAnchor.constraint(equalTo:view.safeAreaLayoutGuide.topAnchor).isActive = true
          contactsTableView.leadingAnchor.constraint(equalTo:view.safeAreaLayoutGuide.leadingAnchor).isActive = true
          contactsTableView.trailingAnchor.constraint(equalTo:view.safeAreaLayoutGuide.trailingAnchor).isActive = true
          contactsTableView.bottomAnchor.constraint(equalTo:view.safeAreaLayoutGuide.bottomAnchor).isActive = true
  
      }
  }
  
  extension CheckListViewController: UITableViewDataSource {
      func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          items.count
      }
      
      func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCell(withIdentifier: &quot;contactCell&quot;, for: indexPath) as! CategoryListCell
          cell.label.text = items[indexPath.row].text
          cell.accessoryType = items[indexPath.row].isChecked ? .checkmark : .none
          return cell
      }
  
      func tableView(
        _ tableView: UITableView,
        commit editingStyle: UITableViewCell.EditingStyle,
        forRowAt indexPath: IndexPath
      ){
  
      }
  
  }
  
  extension CheckListViewController: UITableViewDelegate {
      func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath){
          if let cell = tableView.cellForRow(at: indexPath) {
              items[indexPath.row].isChecked.toggle()
              cell.accessoryType = items[indexPath.row].isChecked ? .checkmark : .none
          }
            tableView.deselectRow(at: indexPath, animated: true)
      }
  }
  
  
  
  </code></pre>