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 833511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:31:48+00:00 2026-05-15T04:31:48+00:00

I have build a UITabBarController programmatically and populated its viewControllers property. When I run

  • 0

I have build a UITabBarController programmatically and populated its viewControllers property.
When I run this the tabBar buttons are, of course, empty, I tried to access the tabBar property on the UITabBarController to set its items property to my text/images, which made the app crash.

Going through the documentation for the UITabBarController I read this under the tabBar property:

The tab bar view associated
with this controller. (read-only)

@property(nonatomic,readonly) UITabBar
*tabBar Discussion You should never attempt to manipulate the UITabBar
object itself stored in this property.
If you attempt to do so, the tab bar
view throws an exception. To configure
the items for your tab bar interface,
you should instead assign one or more
custom view controllers to the
viewControllers property. The tab bar
collects the needed tab bar items from
the view controllers you specify.

The tab bar view provided by this
property is only for situations where
you want to display an action sheet
using the showFromTabBar: method of
the UIActionSheet class.

This is what I want:

The tab bar collects the needed tab
bar items from the view controllers
you specify.

It also makes perfect sense that you do not setup up the tabBar in one place and the content in another.

But how do I define these items in my viewControllers which are all of type UINavigationController, with my custom ViewController as the rootController?

Is there some protocol besides the UITabBarControllerDelegate I need to implement?

Hope someone could point me in the right direction, I did not see this one coming:) 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-05-15T04:31:48+00:00Added an answer on May 15, 2026 at 4:31 am

    In general, the tab bar items gets filled with the name of the view controller you are loading into it.

    In your case you can do one thing,

    [tabbarContrller.tabBarItem initWithTitle:@"rafsfsa" image:[UIImage imageName:@"some.png" tag:0];
    

    Do reply if you get this in.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 421k
  • Answers 421k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If your view is used by more than one controller… May 15, 2026 at 11:05 am
  • Editorial Team
    Editorial Team added an answer Your resources are pointing to a new MyErrors and not… May 15, 2026 at 11:05 am
  • Editorial Team
    Editorial Team added an answer Comparing the documentation, moveBackward says it moves to the beginning… May 15, 2026 at 11:05 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.