2

I am using Storyboard to create a tab bar which has 6 tabs. The tab bar is the initial view controller. I am not using any custom class for my tabbarcontroller. The more tab gets a "edit" button. How can I remove that button?

zahreelay
  • 1,742
  • 12
  • 18

2 Answers2

13

Set the customizableViewControllers of your tabBarController to nil.

tabBarController.customizableViewControllers = nil;
peko
  • 11,267
  • 4
  • 33
  • 48
2

Finally created a custom class for my TabBarController and did this

- (void)navigationController:(UINavigationController *)navigationController
      willShowViewController:(UIViewController *)viewController
                    animated:(BOOL)animated {

    UINavigationBar *morenavbar = navigationController.navigationBar;
    UINavigationItem *morenavitem = morenavbar.topItem;
    /* We don't need Edit button in More screen. */
    morenavitem.rightBarButtonItem = nil;
}

That solved it.

zahreelay
  • 1,742
  • 12
  • 18