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?
Asked
Active
Viewed 2,046 times
2 Answers
13
Set the customizableViewControllers of your tabBarController to nil.
tabBarController.customizableViewControllers = nil;

peko
- 11,267
- 4
- 33
- 48
-
1This needs to be done after you have set the tabs on the tabBarController, if you change them – Jarada Nov 09 '12 at 13:33
-
1But where do you add this if you are using a storyboard like the question asks? – sam_smith Jan 19 '15 at 01:24
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