我是iOS新手。大部分都是在Android上開發的。目前接管了一個iOS應用程序,我必須更新幾個功能。在TabBar應用程序中從ActionSheet顯示NavigationController
此應用程序基於TabBar。幾個導航控制器被推入到標籤欄中,以管理它們之間的切換。但是現在,其中一個選項卡會打開一個ActionSheet並帶有幾個選項。
我必須在其中一個ActionSheet按鈕上單擊打開一個新的NavigationController。
這裏是用戶點擊確定哪一個按鈕一個片段:
switch (buttonIndex) {
case 0:
[self openMyNavigationController];
break;
case 1:
break;
case 2:
break;
default:
break;
}
我不知道該openMyNavigationController方法應該是什麼樣子
開始像這樣:
UIViewController *myViewController = [[MyViewController alloc ] nitWithNibName:@"MyViewController" bundle:nil];
UINavigationController *navMyViewController = [[UINavigationController alloc] initWithRootViewController:myViewController];
什麼都要我確實在屏幕上顯示新創建的NavigationController?
這將隱藏您的TabBar,或者它會在一個標籤中,並將其放入您的導航堆棧?或者你模擬地呈現它? – Dave
我無法隱藏標籤欄。如果可能,操作表應在導航堆棧項目之間切換。或者我可以以模態方式呈現它?但我該如何實現這一目標?我有一種感覺,客戶需要反對本地系統的方法,但是我沒有理由拒絕。 –