1

I have application with lots of views. My main task is to hide uittabar in Main Menu 'cause there is nice buttons (in Main Menu), but I want to show uitabbar in all others view's. Help me please

Tunyk Pavel
  • 2,473
  • 6
  • 31
  • 46

1 Answers1

3

Use this code to hide the tabbar:

 tabBarController.tabBar.hidden =YES;

I used it in delegte method of tabbar and it works fine:

 -(void)tabBarController:didSelectViewController:;

See also this link.

Community
  • 1
  • 1
Iqbal Khan
  • 4,587
  • 8
  • 44
  • 83
  • I put this code in my appDelegate.m file, but nothing happens. If i put line `tabBarController.tabBar.hidden =YES;` in applicationDidFinishLaunchingWithOptions - tabbar hides, but appears a white area on his place. – Tunyk Pavel Apr 01 '11 at 11:07
  • add this method in which u want to hide the tabbar -(void)viewWillAppear:(BOOL)animated{ self.tabBarController.tabBar.hidden =YES; } then adjust ur view in interface builder. the white background is showing bcoz ur main windows background color is white and ur current view has nothing to display at that location. – Iqbal Khan Apr 01 '11 at 11:12
  • Thank you, I found interesting solution [link](http://www.developers-life.com/hide-uitabbarcontrolleruitabbar-with-animation.html) – Tunyk Pavel Apr 01 '11 at 11:15