How to turn off editing mode in UITableView when there are no more cells to delete?

How about [self setEditing:NO animated:YES]? I suppose to self is an instance of UITableViewController.


From the apple docs:

Note: The data source should not call setEditing:animated: from within its implementation of tableView:commitEditingStyle:forRowAtIndexPath:. If for some reason it must, it should invoke it after a delay by using the performSelector:withObject:afterDelay: method.

So, calling this within commitEditingStyle is not a great practice.


If is not just [self setEditing:NO animated:YES] ?