@interface AppDelegate : UIResponder <UIApplicationDelegate>
{
UITabBarController * tabBarController;
}
2.
tabBarController = [[UITabBarController alloc]init];
[self.window setRootViewController:tabBarController];
FirstViewController * firstView = [[FirstViewController alloc]init];
firstView.view.backgroundColor = [UIColor redColor];
SecondViewController * secondView = [[SecondViewController alloc]init];
secondView.view.backgroundColor = [UIColor blackColor];
tabBarController.viewControllers = [NSArray arrayWithObjects:firstView,secondView, nil];
UITabBar * tabBar = tabBarController.tabBar;
UITabBarItem * item1 = [tabBar.items objectAtIndex:0];
UITabBarItem * item2 = [tabBar.items objectAtIndex:1];
item1.title = @"item1";
item2.title = @"item2";