IOS Swift TableView edit action for row at index path
<p>I would like to know if there is an option to close the editing menu in the table view (as shown in the <a href="https://i.stack.imgur.com/IrZbH.png" rel="nofollow noreferrer">screenshot</a>) which we get when we swipe to right. I want the menu to close as soon i select an option, in my case it does not close even when i select any one of the option. It closes only when i select anywhere on the screen.</p>
<p>Below is my code which im using</p>
<pre><code>    func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
    
}

func tableView(tableView: UITableView!, canEditRowAtIndexPath indexPath: NSIndexPath!) -&gt; Bool {
    return true
}

func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -&gt; [UITableViewRowAction]?
{
    let update = UITableViewRowAction(style: .Normal, title: &quot;Update&quot;) { action, index in
        print(&quot;update&quot;)
    }
    let delete = UITableViewRowAction(style: .Default, title: &quot;Delete&quot;) { action, index in
        print(&quot;Delete&quot;)
       
    }
    return [delete, update]
} 
</code></pre>
<p><a href="https://i.stack.imgur.com/IrZbH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IrZbH.png" alt="enter image description here" /></a></p>