I got an application with a tabbar and a navigation controller for one of the tab view. The Navigation controller is pushing several views and one of them has a button which permits to add a subview (I am actually displaying a popup message -not an uialert- when pushing that button).
The problem is that I would like now to be able to push a new view controller once I pushed a button in the subview...
I cannot find my navcontroller, even when I use the pushmethod of a开发者_开发问答ppdelegate.tabbar.navigationController
Does one of you have easy idea about how to implement that ?
Thanks a lot !
If the button's press action of the second button is being handled in the same UIViewController
as the other button's action you should simply be able to use
[self.navigationController pushViewController:newViewController animated:YES];
.
If your subview has it's own UIViewController
you could add a reference to your first UIViewController
or to the navigationController
itself and use it that way.
精彩评论