Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performing segue where Navigation Bar stays and Tab Bar disapears

My app design consist of a UITabBarController and UINavigationController. I have some UITableViews that serve the purpose of enabling the user to select a file to play - and then it segues to a AudioPlayer class. I have several different ways of entering the AudioPlayer through the Tab bar and therefore I want to remove the Tab bar once the Player is active and only display a UINavigationController so the user can return back to were he previously was.

If I do a Push style segue, both the UITabBar and UINavigationBar stay. If I do a modal segue - both go away. How can I have the UINavigationBar stay, and the UITabBar disappear?

like image 703
Tom Lilletveit Avatar asked Dec 07 '25 22:12

Tom Lilletveit


1 Answers

To hide the tab bar you can use hidesBottomBarWhenPushed. For instance:

  MyController *myController = [[MyController alloc]init]; 
  myController.hidesBottomBarWhenPushed = YES;
  [self.navigationController pushViewController:myController animated:YES];
  [myController release];

To hide the status bar you can use:

  [[UIApplication sharedApplication] setStatusBarHidden:YES];

To hide the nav bar you can use:

  self.navigationController.navigationBarHidden = YES;

I guess that is all you need and then some. Good luck. :)

like image 158
Adrian P Avatar answered Dec 11 '25 05:12

Adrian P



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!