Hi developer friends,
I want a little help. I have a view which has it's own navigation bar and one tableview. I want to edit & delete item in that table view. I have placed and edit button on the navigation bar like this.
self.navItem.leftBarButtonItem = self.editButtonItem;
And also have one method like this.
- (void)tableView:(UITableView *)tv commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if(editingStyle == UITableViewCellEditingStyleDelete) {
//Get the object to delete from the array.
//Delete the object from the table.
[self.tblView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
}
But when I am clicking on that button, none of the item in tableview turns with that red mark icon. Just caption of edit button changes to "Done".
What should be the problem?