开发者

Navigation back to main view

I have a root view controller as the navigation controller. In the root view controller nib file I have 3 buttons (button 1, button 2, button3). Each of which has a table view contoller Eg: Flow of the buttons (I have followed the navigation logic such that at any time I can get back to the root view controller by selecting the back button).

On Button 1 click => table view shown ==> detail view shown on item click/selection

On Button 2 click => table view shown ==> detail view shown on item click/selection

This logic holds good for all the buttons. In the detail view I have a button.

What I want is on the click of this button, the button 3 logic should be called such that, when i click or press the back button from the table view of 3rd button, I should get back to the main root view controller with all the butt开发者_Go百科ons visible.

Please let me know how should i go ahead with the same.


I believe you'll want to use the - (NSArray *)popToRootViewControllerAnimated:(BOOL)animated found in UINavigationController. As the name suggests, this will allow you to pop back to the root view controller at any time.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜