I added a editButton on the table like this:
self.navigationItem.leftBarButtonItem = self.editButtonItem;
and, having a setEditing method:
- (void) setEditing:(BOOL)editing animated:(BOOL)animated {
[super setEditing:editing animated:animated];
[self.watchListDetailTableView setEditing:editing animated:animated];
if (editing) {
// you might disable other widgets here... (optional)
} else {
// re-enable disabled widgets (optional)
}
}
after I click the edit, I can have a cross and delete button, which method should I do to handle the delete button click? thank you.