By using " editingStyleForRowAtIndexPath " method , " didSelectRowAtIndexPath " method is not calle

Posted by Madan Mohan on Stack Overflow See other posts from Stack Overflow or by Madan Mohan
Published on 2010-04-27T08:21:26Z Indexed on 2010/04/27 8:23 UTC
Read the original article Hit count: 413

Hi,

the delegate method not called

-(void)viewWillAppear:(BOOL)animated { [theTableView setEditing:TRUE animated:TRUE]; }

-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { return UITableViewCellEditingStyleDelete; } by calling the above the methods i will get minus component before each cell in table view. But the below method didSelectRowAtIndexPath is not called and disclouser indicator is not in visible.

  • (void )tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [theTableView deselectRowAtIndexPath:indexPath animated:YES]; ContactEditViewCotroller *contactEditViewCotroller=[[ContactEditViewCotroller alloc]init]; contactEditViewCotroller.isEdit=isEdit; if(isEdit == YES) { for(int i=0; i<=[editObject.contactList count]-1;i++) { if(indexPath.section == i) { appDelegate.isAddInEdit=NO; editcontacts = [editObject.contactList objectAtIndex:i]; contactEditViewCotroller.editcontacts=editcontacts; indexRow=i; } } } else { for(int i=0; i<=[addContactList count]-1;i++) { if(indexPath.section == i) { appDelegate.isAddInEdit=NO; Contacts *obj = [addContactList objectAtIndex:i]; contactEditViewCotroller.addcontacts=obj; } } } [[self navigationController] pushViewController:contactEditViewCotroller animated:YES]; [contactEditViewCotroller release];

}

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about delegates