簡體   English   中英

Push從UITabbarController導航到UIViewController

[英]Push Navigate from UITabbarController to UIViewController

我正在使用UITabbarController ,它有三個子UIViewController名為FirstViewControllerSecondViewControllerThirdViewController 我在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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM