views:

30

answers:

1

I have a table view which is inside a navigation controller, however besides this the navigation controller does nothing else. So the class is pretty useless. I also have a navigation controller, which has a mapviewcontroller inside, other than that.. it has nothing else.

I know the job is important, that it navigates views back and forth. But is this the way it's supposed to be?

A: 

UINavigationControllers are used to manage a stack of UIViewControllers. To be more specific, you should be housing your table and map in UIViewControllers.

Say, for example, an element in your table links to an instance of your map, you might

[self.navigationController pushViewController:mapVC animated:YES];

in the table view delegates' didSelectRow:atIndexPath:

Strictly speaking, there a very few instances where you need to extend the UINaviagtionController class.

Chidj
yes, that's actually what I did in my code... but the pushViewController is done inside the TableViewController implementation, not in the navigationcontroller. So what do people usually do in the navigationcontroller?
EquinoX
What do you mean by "he pushViewController is done inside the TableViewController implementation"? (Perhaps some code to demonstrate what you are doing)
Chidj