views:

150

answers:

1

I want to add a detail view for one of the cells in my UITableView. I've created a new view controller SyncDetailViewController) and a NIB for the detail view. Didn't make many changes in the new class. Just added a label and outlet for it and connected nib with view controller.

Now I've added this code to my view controller (the one with UITableView, not the new one)

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:
    (NSIndexPath *)indexPath {
    SyncDetailViewController *dvController = [[SyncDetailViewController alloc]
        initWithNibName:@"SyncDetailViewController" bundle:nil];
    [self.navigationController pushViewController:dvController animated:YES];
    [dvController release];
}

The problem is that even if I select any row in the UITableView nothing happens. It doesn't produce any errors or warnings. I've added a breakpoint inside this method and it is reached so this code is executed.

Any ideas are much apprieciated.

+6  A: 

"Nothing happens" sound so much like "sending a message to nil". Have you, by chance, checked that self.navigationController is not nil? Or that dvController is well initialized?

FX
Yeah, that was the case. Thanks.
RaYell