답변

0

tabBarController에 2 개의 탭이 있다고 가정하십시오. AppDelegate에 기능

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    UIViewController *viewController1 = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil]; 

    UIViewController *viewController2 = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil]; 

    self.tabBarController = [[UITabBarController alloc] init]; 

    self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2,nil]; 

    self.window.rootViewController = self.tabBarController; 
    [self.window makeKeyAndVisible]; 


} 

쉽게 tabBarController를 결합 할 수있는이 방법으로

. 참고 : appDelegate.h 파일에서 tabBarController를 선언하는 것을 잊지 마십시오.