How to recognize .delete in editingStyle in Swift 3 to delete cell in tableview
<p>this all my func that connected to my table view. Why I can't delete row?</p>

<p>I also do in <code>viewDidLoad</code></p>

<pre><code>override func viewDidLoad() {
    super.viewDidLoad()
    self.myTableView.dataSource = self
    self.myTableView.delegate = self
    self.myTableView.reloadData()
}


func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
    return arr.count
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {

    let cell = UITableViewCell(style: UITableViewCellStyle.subtitle, reuseIdentifier: "incTV")

    cell.textLabel?.text = "X"

    cell.detailTextLabel?.text =  "Y"

    return cell
}


func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
    if editingStyle == .delete {

        myTableView.deleteRows(at: [indexPath], with: .fade)
        arr.remove(at: (indexPath as NSIndexPath).row)
        self.myTableView.reloadData()
    }
}

override func viewWillAppear(_ animated: Bool) {
    myTableView.reloadData()
}
</code></pre>