我有一個應用程序/遊戲,我想在顯示任何形式的UITabBarController之前顯示一系列視圖控制器(即:開始遊戲,加載遊戲等)。如何在UITabBarController之前啓動視圖控制器?
的過程會是:
- 啓動應用程序委託
- 啓動我的一系列視圖控制器的
- 只有當啓動遊戲已經推出按/顯示的UITabBarController。
我的UITabBarController是聯繫在一起的應用程序委託,和我當前的代碼是這樣的:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
SplashScreenVC *splashScreenVC = [[SplashScreenVC alloc] initWithNibName:@"SplashScreenVC" bundle:[NSBundle mainBundle]];
UINavigationController *firstView = [[UINavigationController alloc] init];
[firstView presentModalViewController:splashScreenVC animated:NO];
[firstView release];
[splashScreenVC release];
[self.window addSubview:[tabController view]];
return YES;
}
我嘗試啓動閃屏作爲一個模式視圖控制器,但是這似乎並沒有工作。
我也嘗試啓動它作爲initWithRootViewController
- 但不管我做了什麼UITabBar仍然啓動,我從來沒有看到模態視圖。
那麼,如何在tabBarController視圖之前啓動東西,視圖等?
非常感謝
我會研究認爲,看看是否」我會工作。理想情況下,儘管我會告訴應用程序委託在標籤視圖控制器之前啓動某些視圖;但如果這不起作用,我會試着隱藏標籤欄,看看是否能解決問題。 – zardon
您實際上可以做另一件事情...添加TabBar之後,只需將您的ViewController的視圖添加到窗口。當你不再需要它們時,只需:[self.view removeFromSuperview]; ViewController的視圖將在tabbar前面,因此您不必擔心將其設置爲不可見。 – Peres
我會給它一個去.. – zardon