I created the table using the UIViewController (instead of the UITableViewController) and keeping the UITableView as my property. I applied the necessary methods of the DataSource and Delegate protocols. But when I click the "Edit" button, I do not see any deletions (red minus signs) for my cells, so that I can select them for deletion. The same thing works fine if I use the UITableViewController. I have completed the following methods.
What am I missing, that it does not behave the way it is done using the standard UITableViewController?
- (void)setEditing:(BOOL)editing animated:(BOOL)animated { [super setEditing:editing animated:animated]; self.navigationItem.rightBarButtonItem.enabled = !editing; } - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { return YES; } - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { return UITableViewCellEditingStyleDelete; }
source share