I have a UIToolbar with an edit bar button on it. This is defined as
self.toolbarItems = [NSArray arrayWithObjects:self.editButtonItem,nil];
The edit bar item shows up, and but when i tap it, nothing happens, it does not change to Done and none of the editing controls show up.
I have implemented the following methods as i would like to be able to tap a cell and display a view to edit that cell's value.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.editing) {
NSLog(@"editing ON in didSelect...");
}else{
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
}
}
- (void)setEditing:(BOOL)editing animated:(BOOL)animate {
if (editing) {
NSLog(@"editing ON in setEditing");
}else {
NSLog(@"not editing in setEditing");
}
}
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
return YES;
}
What is causing the edit button to function incorrectly?
Thanks.