执行segue导航栏停留并且Tab Bar消失

时间:2013-06-19 04:09:34

标签: ios objective-c uinavigationbar uitabbar uistoryboardsegue

我的应用设计包含UITabBarControllerUINavigationController。我有一些UITableViews用于使用户能够选择要播放的文件 - 然后它会转移到AudioPlayer类。我有几种不同的方式通过标签栏输入AudioPlayer,因此我想在播放器处于活动状态时删除标签栏,并且只显示UINavigationController,以便用户可以返回是。

如果我执行Push style segue,UITabBarUINavigationBar都会保留。如果我做一个模态赛 - 都会消失。如何让UINavigationBar停留,UITabBar消失?

1 个答案:

答案 0 :(得分:9)

要隐藏标签栏,您可以使用hidesBottomBarWhenPushed。例如:

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

要隐藏您可以使用的状态栏:

  [[UIApplication sharedApplication] setStatusBarHidden:YES];

要隐藏您可以使用的导航栏:

  self.navigationController.navigationBarHidden = YES;

我想这就是你需要的一切,然后是一些。祝好运。 :)

相关问题