隐藏顶部导航栏
-(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:YES];
}
-(void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
设置背景图
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"001"]];
进入界面时隐藏底部tabbar
// 进入某个界面
NextViewController *nextVC = [[TypeSupplierViewController alloc] init];
// 根据点击种类不同,设立种类属性
nextVC.hidesBottomBarWhenPushed=YES;
// 进入后隐藏tabbar
[self.navigationController pushViewController:nextVC animated:YES];
// 退出时显示tabbar
self.hidesBottomBarWhenPushed = NO;
平常隐藏
self.tabBarController.tabBar.hidden = YES;