views:

68

answers:

0

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];

}