This is what I'm trying to do in TalbeViewController.m:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:TRUE];
if(indexPath.row==0) {
//Initialize the detail view controller and display it.
OmDetail1ViewController *firstDetailController = [[OmDetail1ViewController alloc] initWithNibName:@"OmDetail1ViewController" bundle:nil];
[self.navigationController pushViewController:firstDetailController animated:YES];
[firstDetailController release];
}
else if(indexPath.row==1) {
//The second DetailView
}
else if(indexPath.row==2) {
//The third DetailView
}
}
And this is what I'm told when the first cell is selected:
2012-07-17 14:17:42.660 TheApp[4635:f803] * * * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'OmDetail1ViewController'' * First throw call stack: (0x13d5022 0x1566cd6 0x137da48 0x137d9b9 0x240638 0xe61fc 0xe6779 0xe699b 0xe6d11 0xf88fd 0xf8aef 0xf8dbb 0xf985f 0xf9e06 0xf9a24 0x2f90 0xb05c5 0xb07fa 0x94585d 0x13a9936 0x13a93d7 0x130c790 0x130bd84 0x130bc9b 0x12be7d8 0x12be88a 0x1f626 0x28c2 0x2835) terminate called throwing an exception(lldb)
I've done nothing else to connect the views except importing "OmDetail1ViewController.h" in TableViewController.m. In the IB I've set the correct Class in the utilites but done nothing more, made no connections or so.