Enable editing does not call didSelectRowAtIndexPath ??
Posted
by elementsense
on Stack Overflow
See other posts from Stack Overflow
or by elementsense
Published on 2010-06-15T17:34:19Z
Indexed on
2010/06/15
17:52 UTC
Read the original article
Hit count: 275
iphone
|uitableviewcontroller
Hi
I have a UITableViewController where the user should be able to edit the items. In order to enable editing i use this :
self.navigationItem.rightBarButtonItem = self.editButtonItem;
And for everyone, how does not know where self.editButtonItem comes from, it is predefined by the SDK.
So, now when I press on any item, this method is called :
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
but as soon as I hit the edit button and while editing is active, this method does not seemed to be called.
Any idea what I missing ?
This is the rest of the code that is related to editing :
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
// Return NO if you do not want the specified item to be editable.
return YES;
}
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
{
return UITableViewCellEditingStyleNone;
}
- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath
{
return NO;
}
Thanks for the help.
mcb
© Stack Overflow or respective owner