Search code examples
iphoneuitabbarcontrolleruitabbar

How to disable customization for the TabBar?


within my App it should be forbidden to edit (customize) the TabBar. This means there should be no edit button and no other possibility to change the order of the items.

(this is not my decision, the boss wants it that way :) )

I can't find a property to do this - so is this possible after all?

cheers


Solution

  • you can use

    - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController 
    {
    tabBarController.NaviController.navigationBar.topItem.rightBarButtonItem = nil;
    }