The FooViewController you created there serves no purpose, if I see things correctly. In MainWindow.xib, you have a navigation controller and your own RootViewController. So far so good. You define the view of that in RootViewController.xib. Also ok. But the View Controller inside that last xib will do nothing, until you do something like
[self.navigationController pushViewController:detailViewController animated:YES];
(which is in your didSelectRowAtIndexPath)
The commented out part in didSelectRowAtIndexPath basically invokes a new viewcontroller when a user selects a row, and does so while loading the associated xib file, which is loaded in this line:
DetailViewController *detailViewController = [[DetailViewController alloc]
initWithNibName:@"Nib name" bundle:nil];
You could also create the viewcontroller in a nib file, like you have now, but then you would need to define an
IBOutlet FooViewController *fooVC;
and link that up within IB, and then push this fooVC onto the view stack when the user selects something - in that case you would skip the alloc / init line above.