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;

 

posted @ 2014-04-20 10:16  ygm900  阅读(325)  评论(0编辑  收藏  举报