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

  • Home
  • SEARCH
  • 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 6561221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:33:36+00:00 2026-05-25T13:33:36+00:00

I have a TabBar that I’ve created through IB, I chose create new project

  • 0

I have a TabBar that I’ve created through IB, I chose “create new project” -> “Tab bar application”. Is there a way for me to access one of the TabBarItems for customization through the code?

It seems to me that something like:
[[self.tabBarController.tabBar.items objectAtIndex:0] setTitle:@"Button one"];
should set the title of that item to “Button one”, but it doesen’t. The title itself is not a problem (I can set that through IB aswell), however adding an Icon seems to be.

So to sum up, what I really want to know is: Is there a way to add an Icon to a TabBarItem created through IB?

SOLUTION:
Adding in viewDidLoad in the first view, being loaded automatically upon starting the app:

UITabBarController *tb = [self tabBarController];
[[tb.tabBar.items objectAtIndex:1] setTitle:@"Title"];

Let me set the title of the second button (objectAtIndex: 1). I was also able to set the image the same way, which also worked for buttons one (objectAtIndex: 0) and three (objectAtIndex: 2).

  • 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-05-25T13:33:37+00:00Added an answer on May 25, 2026 at 1:33 pm

    Add this to your viewDidLoad: method of one of the tabBar viewControllers and it should work:

    - (void)viewDidLoad
    {
        [super viewDidLoad];
    
    
        //Get the tabBarItem
        UITabBarItem *tbi = [self tabBarItem];
    
        //Give it a lable
        [tbi setTitle:@"Title A"];
    
        //create a image from a file for the tabBar
        UIImage *i = [UIImage imageNamed:@"NiceImage.png"];
        //and put it on the tabBar
        [tbi setImage:i];
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a Tabbar based application in that i have three tab. each
I have an app that has a TableView, NavigationView and TabBar running together. There
My problem is that I want to have a tab bar view with its
HI, I am new to iphone development.I have created the tabbar programmatically and sets
I have a tabbar application that has one screen that displays statistics based on
I have a TabBar App. I have created a UITableView class called Schedule that
I have created a custom tabbar in my application (using TabHost and TabWidget ).
I have an app that has a tab bar & nav bar for normal
I've got a sample application on http://github.com/niklassaers/Test-iPhone-TabBar-App that shows my problem: I have a
i have created a TabBar Application. I Added to a view an UITableView and

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.