UITabBar 详解

1、push时,将tabar隐藏,方法1,在push之前,加入如下代码:

-(IBAction)btnOnClicked:(id)sender
{
    SQVideoListViewController *videoListViewController = [[[SQVideoListViewController alloc]init]autorelease];
    videoListViewController.type   = [sender tag];
    self.hidesBottomBarWhenPushed = YES;    //用于隐藏tabBar
    [self.navigationController pushViewController:videoListViewController animated:YES];
    self.hidesBottomBarWhenPushed = NO;
}

方法二,在需要隐藏的controller中添加:

 self.tabBarController.tabBar.hidden = YES;

 

你可能感兴趣的:(tab)