我有一个基于标签栏的iPhone应用程序。
该应用程序包含2个选项卡。 每个选项卡都有一个带有3个ViewControllers的导航控制器。
如何防止TabBar显示在其中一个ViewControllers中(因为它已经有自己的TabBar导航)?
答案 0 :(得分:2)
发现这个,归功于原始的后期:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
if (appDelegate.navigationController.navigationBar.hidden == NO)
{
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES];
[appDelegate.navigationController setNavigationBarHidden:YES animated:YES];
[UIView beginAnimations:@"HideTabbar" context:nil];
[UIView setAnimationDuration:.2];
self.view.frame = CGRectMake(0,0,320,480);
[UIView commitAnimations];
}
if (appDelegate.navigationController.navigationBar.hidden == YES)
{
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES];
[appDelegate.navigationController setNavigationBarHidden:NO animated:YES];
[UIView beginAnimations:@"ShowTabbar" context:nil];
[UIView setAnimationDuration:.2];
self.view.frame = CGRectMake(0,0,320,368);
[UIView commitAnimations];
}
}