隱藏tabbar和navibar
一、navigation
// 設(shè)置navigationBar的背景顏色助析,根據(jù)需要自己設(shè)置
self.navigationBar.barTintColor = UIColorFromRGB(0x0087ca);
// 設(shè)置navigationBar是否透明朋贬,不透明的話會使可用界面原點下移(0切省,0)點為導(dǎo)航欄左下角下方的那個點
self.navigationBar.translucent = NO;
// 設(shè)置navigationBar是不是使用系統(tǒng)默認返回胀屿,默認為YES
self.interactivePopGestureRecognizer.enabled = YES;
// 創(chuàng)建一個顏色,便于之后設(shè)置顏色使用
UIColor * color = [UIColor whiteColor];
// 設(shè)置navigationBar元素的背景顏色辛掠,不包括title
self.navigationBar.tintColor = color;
// 設(shè)置navigationController的title的字體顏色
// NSDictionary * dict=[NSDictionary dictionaryWithObject:color forKey:NSForegroundColorAttributeName];
//self.navigationBar.titleTextAttributes = dict;
二、tabbarController
1.-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self hidesTabBar:NO animated:YES];
}
-(void)viewWillDisappear:(BOOL)animated
{
[self hidesTabBar:YES animated:YES];
}
2.hidesBottomBarWhenPushed
**在push控制器前設(shè)置yes 在語句后設(shè)置No 這樣pop back時候就恢復(fù)顯示释牺;