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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:06:57+00:00 2026-05-18T10:06:57+00:00

I hope anyone can explane me how to do this: I have a TabBar

  • 0

I hope anyone can explane me how to do this:

I have a TabBar and two TabBarItems, how can I attatch the Items to the TabBar.
I am not doing this via IB because the TabBar only fits have of the screen because the items should be on the left side.

thats how i build them:

tabBarController = [[UITabBarController alloc] initWithNibName:nil bundle:nil];
tabBarController2 = [[UITabBarController alloc] initWithNibName:nil bundle:nil];

tabBarController.tabBar.frame = CGRectMake(0, 974, 384, 50);    
tabBarController2.tabBar.frame = CGRectMake(384, 974, 384, 50);

UITabBarItem *tbi1 = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemMostViewed tag:0];
UITabBarItem *tbi2 = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemMostViewed tag:1];
  • 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-18T10:06:58+00:00Added an answer on May 18, 2026 at 10:06 am

    You don’t set tab bar items directly in the tab bar. Instead, you assign a tab bar item to the tabBarItem property for each view controller contained by your tab bar controller. Then when you add your view controllers to the tab bar controller, the tab bar controller will manage the display of your tab bar items for you.

    UITabBarController * tabBarController = [[UITabBarController alloc] init];
    
    UIViewController * viewController1 = [[YourViewController alloc] init];
    UIViewController * viewController2 = [[YourOtherViewController alloc] init];
    
    viewController1.tabBarItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemMostViewed tag:0];
    viewController2.tabBarItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemMostViewed tag:1];
    
    tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, nil];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this doubt for a long time... hope anyone can enlight me. Suppose
I hope anyone can help. I have to develop up against this third party
I hope anyone can help me out in this topic, even if it's not
Hope anyone can shed light on this so I can use pens with dash
I hope anyone can help me (Sorry for my english). I have a problem
hope someone can help with this. I currently have an Add to Cart option
I am stuck and in need of a hand. Hope someone can help? Anyone
I'm new here and I hope anyonte can help me. I have WCF Service
Hope this question is not stupid since I am an amateur web designer. I
Hope the AWK gurus can provide a solution to my problem . I have

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.