iPhone 6.0 シミュレーターでアプリを実行すると、表示されます
アプリケーション ウィンドウには、アプリケーションの起動の最後にルート ビュー コントローラーがあることが期待されます。
他のシミュレーターにはありません。なんで?このエラーの意味は何ですか?
私のアプリのナビゲーション フローは次のようになります。まず、私のアプリはログイン画面を表示する必要があります。アプリに入った後、タブバーで 1 つのビューを表示する必要があります。そのビューには非常に多くのボタンがあり、これらのボタンをクリックすると、タブバーなしでそれぞれのビューコントローラーが表示されます。そのため、これらのナビゲーション コントローラーをウィンドウに追加しました。
これが didFinishLaunchingWithOptions の私のコードです
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.tabBarController = [[UITabBarController alloc] init];
self.window.rootViewController = self.tabBarController;
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor=[UIColor blackColor];
[application setStatusBarStyle:UIStatusBarStyleBlackOpaque];
Object1 = [[Class1 alloc] initWithNibName:@"Class1" bundle:nil];
tempNav=[[UINavigationController alloc]initWithRootViewController:Object1];
tempNav.navigationBar.hidden=YES;
tempNav.view.frame = CGRectMake(0.0f, 20.0f, 320.0f, 460.0f);
self.window addSubview:tempNav.view];
LoginObj = [[Login alloc] initWithNibName:@"Login" bundle:nil];
navController=[[UINavigationController alloc]initWithRootViewController:LoginObj];
navController.navigationBar.hidden=YES;
navController.view.frame = CGRectMake(0.0f, 20.0f, 320.0f, 460.0f);
[self.window addSubview:navController.view];
Obj2 = [[Class2 alloc] initWithNibName:@"Class2" bundle:nil];
navController1=[[UINavigationController alloc]initWithRootViewController:Obj2];
navController1.navigationBar.hidden=YES;
navController1.view.frame = CGRectMake(0.0f, 20.0f, 320.0f, 460.0f);
[self.window addSubview:navController1.view];
Obj3 = [[Class3 alloc] initWithNibName:@"Class3" bundle:nil];
navController2=[[UINavigationController alloc]initWithRootViewController:Obj3];
navController2.navigationBar.hidden=YES;
navController2.view.frame = CGRectMake(0.0f, 20.0f, 320.0f, 460.0f);
[self.window addSubview:navController2.view];
Obj4 = [[Class4 alloc] initWithNibName:@"Class4" bundle:nil];
navController3=[[UINavigationController alloc]initWithRootViewController:Obj4];
navController3.navigationBar.hidden=YES;
navController3.view.frame = CGRectMake(0.0f, 20.0f, 320.0f, 460.0f);
[self.window addSubview:navController3.view];
[self.window makeKeyAndVisible];
return YES;
}