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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:47:28+00:00 2026-06-01T08:47:28+00:00

I am new to this iphone development.I have created a tab bar application which

  • 0

I am new to this iphone development.I have created a tab bar application which consist of 6 tabs
this is the code for the tab bar controller creation in appdelegaate file didfinishlaunching

UIViewController *viewController1 = [[[cardsAvailable1 alloc] 
                                      initWithNibName:@"cardsAvailable1" bundle:nil] autorelease];
UIViewController *viewController2 = [[[fetchcard1 alloc] 
                                      initWithNibName:@"fetchcard1" bundle:nil] autorelease];
UIViewController *viewController3 = [[[registration alloc] 
                                      initWithNibName:@"registration" bundle:nil] autorelease];
UIViewController *viewController4 = [[[logintab alloc] 
                                      initWithNibName:@"logintab" bundle:nil] autorelease];

UIViewController *viewController5 = [[[registration alloc] 
                                      initWithNibName:@"logout" bundle:nil] autorelease];
UIViewController *viewController6 = [[[logintab alloc] 
                                      initWithNibName:@"myprofile" bundle:nil] autorelease];

self.tabBarController = [[[UITabBarController alloc] init] autorelease];

self.tabBarController.viewControllers = [NSArray arrayWithObjects:
                                         [[[UINavigationController alloc] initWithRootViewController:viewController1] autorelease], 
                                         [[[UINavigationController alloc] initWithRootViewController:viewController2] autorelease],
                                         [[[UINavigationController alloc] initWithRootViewController:viewController3] autorelease],
                                         [[[UINavigationController alloc] initWithRootViewController:viewController4] autorelease], 
                                         [[[UINavigationController alloc] initWithRootViewController:viewController5] autorelease],
                                         [[[UINavigationController alloc] initWithRootViewController:viewController6] autorelease],
                                         nil];
 self.tabBarController.selectedIndex = 3;

self.window.rootViewController = self.tabBarController;
[self.window addSubview:self.tabBarController.view];

[self.window makeKeyAndVisible];

now my problem is after a person is login ie onclick the login button present in the login page i would like to hide the two tab bar item ie registration page and also login page and need to bring the logout page and myprofile page with the tab bar including fetch card and card avalable can any one suggest me a method to do that?

  • 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-01T08:47:29+00:00Added an answer on June 1, 2026 at 8:47 am

    You can add and remove items on a tab bar by editing the array of view controllers for the tab bar.

    NSMutableArray newArrayOfItems = [[NSMutableArray alloc] initWithArray:self.tabBarController items]];
    [newArrayOfItems removeObjectAtIndex:indexOfUnneededItem];
    [self.tabBarController setItems:newArrayOfItems animated:true];
    [newArrayOfItems release];
    

    In your example and in response to your comment the following code will work as long as you import your app delegate header.

    NSMutableArray newArrayOfItems = [[NSMutableArray alloc] initWithArray: [[[UIApplication sharedApplication] delegate].tabBarController items]];
    [newArrayOfItems removeObjectAtIndex:indexOfUnneededItem];
    [[[UIApplication sharedApplication] delegate].tabBarController setItems:newArrayOfItems animated:true];
    [newArrayOfItems release];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to iPhone development.I have created an application using UITableViewCellAccessoryDisclosureIndicator . I
I am new to iphone development.I have created a button in UIView controller.On clicking
I am new to iPhone development. I have created one view controller and I
I am new to iphone development.I am creating a map application. I have created
Im new to iPhone development and I have really taken this to me. I
I am new to iphone development. I have created grouped table and display the
I'm new to iPhone development and have run in to a problem. This is
i am new to iphone application development, here i have one doubt in solving
I am new in iPhone development. I want to create one application in which
Being new to iPhone development I am really struggling with this concept. 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.