我已經解決了這個問題。我只是發佈我的結果,因爲它可以幫助其他人。iOS導航控制器不會移動到下一個視圖控制器
我有一個UITabBarController
與UINavigationController
和UIViewController
被推到UINavigationController
。我以前在我的UITabBarController
上只有2個選項卡,但現在我有6個。所以我有一個「更多」按鈕,必須按才能看到其他選項卡。每當我嘗試在「更多」下的任何標籤中推送UIViewController
我的應用程序不會切換到UIViewController
。 viewDidAppear函數不會被調用或任何東西。
這裏是我的代碼:
if (newViewController == 0)
newViewController = [[NewViewViewController alloc] initWithNibName: @"NewViewControllerXIB" bundle: [NSBundle mainBundle]];
TestAppDelegate *appDelegate = (TestAppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate.navController pushViewController: newViewController animated: true];
接受您自己的答案。 – Piyush
我會在兩天內允許我。 – Someone13