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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:19:02+00:00 2026-05-24T03:19:02+00:00

I have application in which i have create tab-bar dynamically. Now i want to

  • 0

I have application in which i have create tab-bar dynamically. Now i want to add default items like contact, more, about, favorite etc. How i add all these item dynamically with Tab-Bar?

CGRect myTab =CGRectMake(0,368,320,49);
UITabBar *tabBar = [[UITabBar alloc] initWithFrame:myTab];  

[self.view addSubview:tabBar];
  • 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-24T03:19:03+00:00Added an answer on May 24, 2026 at 3:19 am

    Usually you would be creating a TabBar using a UITabBarController, in which case you can simply set the property

    @property(nonatomic, copy) NSArray *viewControllers
    

    If you’re sure you wish to create a UITabBar then you want to use the items property. Something like this:

    - (void) setupTabBar {
        UITabBar *tabBar = [[UITabBar alloc] initWithFrame:myTab];
        NSMutableArray *items = [[[NSMutableArray alloc] init] autorelease];
    
        // Add a 'test' item with no image and the text "Test"
        [items addObject:[[[UITabBarItem alloc] initWithTitle:@"Test" image:nil tag:1] autorelease] ];
    
        // Add a 'contacts' item
        [items addObject:[[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemContacts tag:2] autorelease] ];
    
        // Put the items in the tab bar
        tabBar.items = items;
    
        // Setup this object to respond to tab changes
        tabBar.delegate = self;
    }
    
    - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item {
        if (item.tag == 2) {
            // Contacts was selected. Do something...
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i have develop an android application in which i want to prevent user
I have working on an application which captures screen shots and create video from
I have a tab bar controller that I have created programmatically, named TPastJourneyTabbar .
I currently have a application which will display the time allocated to a user
I have a console application which uploads jobs to the workers running in the
I have a navigation based application using Core Data and several levels of drill-down
I have an existing iPhone application, and I just wanted to make a static
Assume that we have a network deployed desktop application written in .NET. We don't
I'm creating a plugin for an application which works with a concept of families.
I am working on a navigation based application which involves LOGIN view. My approach

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.