This Pickture is black out screen but build success...的Objective-C的UINavigationController +的UITabBarController
我的應用程序有UINavigationController的和的UITabBarController。 但是,secondViewController在顯示屏上是黑色的!
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
//2 UIViewControllerの生成
FirstViewController *firstViewController = [[FirstViewController alloc] initWithNibName:nil bundle:nil];
SecondViewController *secondViewController = [[SecondViewController alloc] initWithNibName:nil bundle:nil];
NoteFunction *noteFunction = [[NoteFunction alloc]initWithNibName:nil bundle:nil];
//3 UINavigationControllerの生成
navigationController1 = [[UINavigationController alloc]initWithRootViewController:firstViewController];
navigationController3 = [[UINavigationController alloc]initWithRootViewController:noteFunction];
//4 NavigationControllerを配列にしてまとめる
navi = [NSArray arrayWithObjects:navigationController1,navigationController3,nil];
//5 tabbarcontrollerの生成
tabBarController = [[UITabBarController alloc] initWithNibName:nil bundle:nil];
[tabBarController setViewControllers:navi animated:NO];
self.window.rootViewController = tabBarController;
noteFunction.title = @"ノート";
[window addSubview:tabBarController.view];
[self.window makeKeyAndVisible];
return YES;
請投票我的答案。 – user3182143