I had added a tab bar in my application dynamically as shown below:-
if (isLogin == TRUE) {
rootController = [[SettingsViewController alloc] init];
tabTitle = @"Settings";
navTitle = @"Settings";
tabImage = [UIImage imageNamed:@"icon1.png"];
}
else
{
root =TRUE;
rootController = [[RootViewController alloc] init];
tabTitle = @"Home";
navTitle = @"Login";
tabImage = [UIImage imageNamed:@"icon1.png"];
}
break;
case 1:
rootController = [[AboutUs alloc] init];
tabTitle = @"AboutUs";
navTitle = @"AboutUs";
tabImage = [UIImage imageNamed:@"icon2.png"];
break;
case 2:
rootController = [[ContactUsViewController alloc] init];
tabTitle = @"Contact Us";
navTitle = @"Contact Us";
tabImage = [UIImage imageNamed:@"icon3.png"];
break;
case 3:
rootController = [[MoreViewController alloc] init];
tabTitle = @"More";
navTitle = @"More";
tabImage = [UIImage imageNamed:@"icon4.png"];
break;
rootController.view.hidden = FALSE;
UINavigationController *subController = [[UINavigationController alloc]
initWithRootViewController:rootController];
subController.navigationBar.tintColor = [UIColor colorWithRed:(110.0/255.0) green:(184.0/255.0) blue:(71.0/255.0) alpha:1.0];
subController.navigationBar.topItem.title = navTitle;
subController.title = tabTitle;
subController.navigationItem.hidesBackButton =YES;
subController.tabBarItem.image = tabImage;
NSLog(@"%@",subController);
[controllers addObject:subController];
NSLog(@"%@",controllers);
[subController release];
[rootController release];
As a result it is showing the tab as below form:-
But I want to cutomise the default detected color of tab bar(Blue color) into orange and want tab bar to look like this:-
Please help me; how can I do this?