Reputation: 443
I know that it was a old question but i can't solve it. I made a Tabbar controller with seven tab item in storyboard with tab bar controller not in custom tab bar so, i want to hide an edit button on more section of tab bar.
for that i code as:
on application didFinishLaunchingWithOptions: method
_tabbarconroller.customizableViewControllers=[NSArray arrayWithObjects:nil];
and also add a method
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
UINavigationBar *morenavbar = navigationController.navigationBar;
UINavigationItem *morenavitem = morenavbar.topItem;
morenavitem.rightBarButtonItem = nil;
}
but it is not working in iOS7 please give me answer or any resource for this,
Upvotes: 0
Views: 913
Reputation: 38239
Use UITabBarController's customizableViewControllers
property
to make it nil
:
yourTabBarController.customizableViewControllers = nil;
Upvotes: 1