隐藏导航栏或返回按钮

1 - (void)viewWillAppear:(BOOL)animated
2 {
3    [super viewWillAppear:animated];
4    [self.navigationController setNavigationBarHidden:YES animated:YES]; // 隐藏导航栏
5 [self.navigationItemsetHidesBackButton:YES]; // 隐藏返回按钮
5 }

 

1 左右键则可以用 
2 self.navigationItem.leftBarButtonItem.hidden = YES;

 

 

 

posted @ 2013-01-18 09:12  diablo大王  阅读(8943)  评论(0编辑  收藏  举报