隐藏tabbar和navibar

隐藏tabbar和navibar
一、navigation
// 设置navigationBar的背景颜色,根据需要自己设置
self.navigationBar.barTintColor = UIColorFromRGB(0x0087ca);
// 设置navigationBar是否透明,不透明的话会使可用界面原点下移(0,0)点为导航栏左下角下方的那个点
self.navigationBar.translucent = NO;
// 设置navigationBar是不是使用系统默认返回,默认为YES
self.interactivePopGestureRecognizer.enabled = YES;
// 创建一个颜色,便于之后设置颜色使用
UIColor * color = [UIColor whiteColor];
// 设置navigationBar元素的背景颜色,不包括title
self.navigationBar.tintColor = color;
// 设置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控制器前设置yes 在语句后设置No 这样pop back时候就恢复显示;

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容