Do you know how to have some cells appear in a table view after the table goes into editing mode? Just like the \"Contacts\" iPhone app does when you edit a contact.
Where did you enter the editing state of the tableView? You should do it in -[UINavigationController setEditing:animated:]:
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
[super setEditing:editing animated:animated];
[self.tableView setEditing:editing animated:animated];
if(editing){
[self.tableView insertSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationBottom];
} else {
// delete section
}
}
So instead of calling setEditing on the tableView, call it on the navigationController (probably self
) The controller will then handle the editing mode.
So the controller has an editing mode, and the tableView has. The tableView will be in editing mode once you set it programmatically, or when the user swipes to delete a row. In the latter case, the controller is not in editing mode, but the tableView is.