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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:38:21+00:00 2026-06-15T11:38:21+00:00

I found this code here that i think will do the job. `/* suppose

  • 0

I found this code here that i think will do the job.

`/* suppose we have a UITabBar *myBar, and an int index idx */  
NSMutableArray modifyMe = [[myBar items] mutableCopy];  
[modifyMe removeObjectAtIndex:idx];  
NSArray *newItems = [[NSArray alloc] initWithArray:modifyMe];  
[myBar setItems:newItems animated:true];`

The question is, where should i write this code in order to work?
I tried putting it in viewDidLoad of the UITabBarController but it didn’t work.

  • 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-15T11:38:23+00:00Added an answer on June 15, 2026 at 11:38 am

    If you’re modifying the tabbar items from the UITabbarController, you can’t use setItems:animated:. From the docs:

    In iOS 3.0 and later, you should not attempt to use the methods and properties of this class to modify the tab bar when it is associated with a tab bar controller object. Modifying the tab bar in this way results in the throwing of an exception. Instead, any modifications to the tab bar or its items must occur through the tab bar controller interface.

    Instead, swap out the viewControllers property of your UITabbarController, removing the UIViewController that corresponds to the tabbar item you want removed. For example, if you want to remove the 2nd tabbar item:

    NSMutableArray *newViewControllers = [NSMutableArray arrayWithArray:self.viewControllers];
    [newViewControllers removeObjectAtIndex:1];
    [self setViewControllers:newViewControllers];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been here and accordingly found out that this piece of code here var
I cannot get this to work, here is code that I found in another
I found this code here class Usable; class Usable_lock { friend class Usable; private:
I found this code from here: http://www.cssportal.com/form-elements/text-box.htm But the problem is you can still
Here I found this code: import java.awt.*; import javax.swing.*; public class FunWithPanels extends JFrame
Here in Apple's sample code I found this type of persistence storage. Can anyone
i found this code -(NSString *) genRandStringLength: (int) len { NSMutableString *randomString = [NSMutableString
Today I found this query in our code that pulls up a list of
Here's my code: @interface Game : Layer // this is from cocos2d { int
I have the next code(found here at stack overflow): string [] arr = {One,Two,Three};

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.