iphone navigation UI 2 levels
the first screen shows a list of categories in tableview select one item goes to the next screen which shows a list of items开发者_StackOverflow社区 in that category in a tableview and shows a home nav button back. and selecting an item in this view would take me to a detail view showing a nav button back to that category i just selected.
all the examples i've found are 1 level only.
does anyone know of any examples or this how to program this?
The back button means 1 back, and that's it. But if you want to go two back when you tap something or press a button or something, you can always put in some code like this and it'll go two back, nicely animated
NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
[viewControllers removeLastObject];
[viewControllers removeLastObject];
[self.navigationController setViewControllers:viewControllers animated:YES];
精彩评论