0

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,

Pradhyuman Chavda
  • 3,814
  • 4
  • 16
  • 24
Ashish Gabani
  • 445
  • 1
  • 5
  • 30

1 Answers1

1

Use UITabBarController's customizableViewControllers property to make it nil :

yourTabBarController.customizableViewControllers = nil;
Paresh Navadiya
  • 38,095
  • 11
  • 81
  • 132
  • i write a code in my AppDelegate.m file on did finish launching mehod like as:- _tabbarconroller.customizableViewControllers=nil; and in AppDelegate.h i declare tab bar as @property(strong,nonatomic)UITabBarController *tabbarconroller; but it is not working. – Ashish Gabani Oct 06 '14 at 12:39