I'm working on an iPad app which has a UISplitView
. The root view of the split view is a UITableView
. When the split view is rotated portrait, the root view controller is displayed in a UIPopoverViewController
(obviously this is standard practice).
The issue I'm having is, when iPad is in portrait rotation, if the user swipes to delete on the root view and then touches on the detail view, and then opens the root view again, the cell will still be in the same state showing the "delete" from the swipe gesture. This is not the expected behavior.
Currently I am calling reloadData
on the table view in viewDidDisappear
(after super) in the root view, which has the desired end result. Is there is a more efficient way to accomplish this?
You could alternatively end the editing mode of the UITableView
(probably also in viewDidDisappear
).
self.tableView.editing=false;
Not sure if that's more efficient - more explicit perhaps.
And to animate it:
[tableView setEditing:NO animated:YES];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With