aaaViewController *aa = [[aaaViewController alloc] init];
UINavigationController* ayNav = [[UINavigationController alloc]initWithRootViewController:aa];
aaaViewController *bb = [[aaaViewController alloc] init];
UINavigationController* bNav = [[UINavigationController alloc]initWithRootViewController:bb];
aaaViewController *cc = [[aaaViewController alloc] init];
UINavigationController* cNav = [[UINavigationController alloc]initWithRootViewController:cc];
UITabBarController *tabBarController = [[UITabBarController alloc]init];
tabBarController.viewControllers=[[NSArray alloc]initWithObjects:ayNav,bNav,cNav,nil];
UITabBar *tabBar = tabBarController.tabBar;
UITabBarItem *aTabBarItem = [tabBar.items objectAtIndex:0];
UITabBarItem *bTabBarItem = [tabBar.items objectAtIndex:1];
UITabBarItem *cTabBarItem = [tabBar.items objectAtIndex:2];
aTabBarItem.title = @"aaa";
bTabBarItem.title = @"bbb";
aTabBarItem.selectedImage=[[UIImage imageNamed:@"menu01_focused.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
aTabBarItem.image=[[UIImage imageNamed:@"menu01_default.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
bTabBarItem.selectedImage=[[UIImage imageNamed:@"menu02_focused.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
bTabBarItem.image=[[UIImage imageNamed:@"menu02_default.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
cTabBarItem.selectedImage=[[UIImage imageNamed:@"menu03_focused.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
cTabBarItem.image=[[UIImage imageNamed:@"menu03_default.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
UIImage* tabBarBackground = [UIImage imageNamed:@"navi_44.png"];
[[UITabBar appearance]setBackgroundImage:tabBarBackground];
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], NSForegroundColorAttributeName,nil] forState:UIControlStateNormal];
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor redColor], NSForegroundColorAttributeName,nil] forState:UIControlStateSelected];
tabBarController.selectedIndex=1;
self.window.rootViewController = tabBarController;
UINavigationController* ayNav = [[UINavigationController alloc]initWithRootViewController:aa];
aaaViewController *bb = [[aaaViewController alloc] init];
UINavigationController* bNav = [[UINavigationController alloc]initWithRootViewController:bb];
aaaViewController *cc = [[aaaViewController alloc] init];
UINavigationController* cNav = [[UINavigationController alloc]initWithRootViewController:cc];
UITabBarController *tabBarController = [[UITabBarController alloc]init];
tabBarController.viewControllers=[[NSArray alloc]initWithObjects:ayNav,bNav,cNav,nil];
UITabBar *tabBar = tabBarController.tabBar;
UITabBarItem *aTabBarItem = [tabBar.items objectAtIndex:0];
UITabBarItem *bTabBarItem = [tabBar.items objectAtIndex:1];
UITabBarItem *cTabBarItem = [tabBar.items objectAtIndex:2];
aTabBarItem.title = @"aaa";
bTabBarItem.title = @"bbb";
cTabBarItem.title = @"ccc";
aTabBarItem.selectedImage=[[UIImage imageNamed:@"menu01_focused.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
aTabBarItem.image=[[UIImage imageNamed:@"menu01_default.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
bTabBarItem.selectedImage=[[UIImage imageNamed:@"menu02_focused.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
bTabBarItem.image=[[UIImage imageNamed:@"menu02_default.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
cTabBarItem.selectedImage=[[UIImage imageNamed:@"menu03_focused.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
cTabBarItem.image=[[UIImage imageNamed:@"menu03_default.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
UIImage* tabBarBackground = [UIImage imageNamed:@"navi_44.png"];
[[UITabBar appearance]setBackgroundImage:tabBarBackground];
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], NSForegroundColorAttributeName,nil] forState:UIControlStateNormal];
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor redColor], NSForegroundColorAttributeName,nil] forState:UIControlStateSelected];
tabBarController.selectedIndex=1;
self.window.rootViewController = tabBarController;