J'avais ajouté une barre d'onglets dans mon application dynamique comme indiqué ci-dessous: -Changer la couleur de la barre d'onglet personnalisé dans iphone
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];
En conséquence, il montre l'onglet ci-dessous forme: -
Mais je veux cutomise la valeur par défaut de la barre de couleur détecté onglet (couleur bleu) dans l'orange et que vous voulez barre d'onglets pour ressembler à ceci: -
S'il vous plaît aidez-moi; Comment puis-je faire ceci?
Vous devez accepter la réponse de Rahul Vyas – Legolas