Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7917243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:04:47+00:00 2026-06-03T15:04:47+00:00

I have a tabbarcontroller that is pushed onto a navigationController. I tried to change

  • 0

I have a tabbarcontroller that is pushed onto a navigationController. I tried to change the background color of the tab bar however it does not work:

    UIViewController *viewController1, *viewController2;
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        viewController1 = [[Tab1_iPhone alloc] initWithNibName:@"tab1_iPhone" bundle:nil];
        viewController2 = [[Tab2_iPhone alloc] initWithNibName:@"tab2_iPhone" bundle:nil]; 
    } 
    self.tabBarController = [[UITabBarController alloc] init];

    CGRect frame = CGRectMake(0.0, 0.0, 480, 48);
    UIView *v = [[UIView alloc] initWithFrame:frame];
    [v setBackgroundColor:[UIColor blueColor]]; //003366
    [v setAlpha:1.0];
    [[self.tabBarController tabBar] insertSubview:v atIndex:0];


    self.tabBarController.viewControllers = [NSArray arrayWithObjects: viewController1, viewController2, nil];
    [self.navigationController setNavigationBarHidden:YES];
    [self.navigationController pushViewController:self.tabBarController animated:YES];

    [self.window makeKeyAndVisible];

This is the code I saw on a similar post that changes the bg color:

    CGRect frame = CGRectMake(0.0, 0.0, 480, 48);
    UIView *v = [[UIView alloc] initWithFrame:frame];
    [v setBackgroundColor:[UIColor blueColor]]; //003366
    [v setAlpha:1.0];
    [[self.tabBarController tabBar] insertSubview:v atIndex:0];

Am I doing something wrong?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:04:49+00:00Added an answer on June 3, 2026 at 3:04 pm

    The below code helps you to add custom colors with RGB values to ur tabBar.

    self.tabBarController.tabBar.tintColor = [[UIColor alloc] initWithRed:0.00
                                                                green:0.62
                                                                 blue:0.93
                                                                alpha:1.0];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a tabbarController application that has 4 tab bar item ,i need in
I'm developing an iPhone application that have a TabBarController with two tabs. Each tab
I have a tab bar that is created programmatically and I'm having difficulties initializing
I have an ios5 app developed using storyboards that currently displays a tab bar
I have an app that has a tab bar & nav bar for normal
I have a tabbarcontroller, in one tab it has a navigationcontroller with tableview controller.And
I have a tab bar controller with five buttons. That controller has a tab
I have a view inside a tabbarcontroller and navigationcontroller and my 'willAnimateRotationToInterfaceOrientation' method is
I have a view controller with a button and after clicking that button tabbarcontroller
I have a vertical navigation that I want to use similar to a TabBarController

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.