开发者

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜