Reputation: 2573
I am trying to have a tableView which have edit button to remove cells by default. Is there anyway to achieve that rather than selecting edit button and then to get to edit mode?
Thanks
Upvotes: 1
Views: 1394
Reputation: 21967
Editing mode is a state of the UITableView
. You can set it programmatically with:
[tableView setEditing:YES animated:YES]
You can do this anytime, with or without animation.
Upvotes: 4
Reputation: 119242
Set the table view to editing mode as soon as it appears. In your viewWillAppear method:
self.tableView.editing = YES;
Upvotes: 1