0
此項目的標籤欄沒有顯示,而只是顯示一個黑色的屏幕。此應用程序委託中的應用程序啓動時,實用地輸入此標籤欄。沒有出現標籤欄
main_tab=[[UITabBarController alloc]init];
viewcontroller = [[HomeViewController alloc]init];
viewcontroller.title [email protected]"Home";
UINavigationController *nav =[[UINavigationController alloc]initWithRootViewController:viewcontroller];
viewcontroller1 = [[SearchViewController alloc]init];
viewcontroller1.title [email protected]"Search";
UINavigationController *nav1 =[[UINavigationController alloc]initWithRootViewController:viewcontroller1];
tabs_array=[[NSArray alloc]initWithObjects:nav,nav1, nil];
main_tab.viewControllers=tabs_array;
[self.window addSubview:main_tab.view];
[self.window makeKeyAndVisible];
return YES;
你有HomeViewController和SearchViewController XIB文件? – rdelmar