0

我使用UITabbarController其中有三个子UIViewController命名为FirstViewControllerSecondViewController,ThirdViewController。我在FirstViewController上有一个按钮。当我们点击按钮时,它需要推送导航到FourthViewController。这里FourthViewController本身在UITabBarController内导航。但我需要它导航出UITabBarController不在里面。Push从UITabbarController导航到UIViewController

按钮目标操作

ForthViewController *share = [[ForthViewController alloc] init]; 
[self.navigationController pushViewController:share animated:YES]; 

任何人都可以指导我的正确途径。在此先感谢..

+0

”我需要它导航出UITabbarController不在里面“意思?... – NAZIK

+0

戈利得到了我的观点,它的工作原理。谢谢您的关注.. –

回答

2

试试这个:

ForthViewController *share = [[ForthViewController alloc] init]; 
[self.parentViewController.navigationController pushViewController:share animated:YES]; 

只要你的标签栏控制器是一个导航控制器,这将推动该导航堆栈上的视图控制器。 “

+0

Super Goley。它工作正常。谢谢你.. –

+0

它不适合我。 –

相关问题