[英]Push Navigate from UITabbarController to UIViewController
我正在使用UITabbarController
,它有三個子UIViewController
名為FirstViewController
, SecondViewController
, ThirdViewController
。 我在FirstViewController
上有一個按鈕。 當我們點擊按鈕時,它需要推送到FourthViewController。 這里的FourthViewController在UITabBarController
本身內導航。 但我需要它導航出UITabBarController
不在里面。
按鈕目標操作
ForthViewController *share = [[ForthViewController alloc] init];
[self.navigationController pushViewController:share animated:YES];
任何人都可以指導我正確的方式。 提前致謝..
嘗試這個:
ForthViewController *share = [[ForthViewController alloc] init];
[self.parentViewController.navigationController pushViewController:share animated:YES];
只要您的標簽欄控制器位於導航控制器中,就會將視圖控制器推送到該導航堆棧上。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.