您好,欢迎来到二三四教育网。
搜索
您的当前位置:首页隐藏tabbar和navibar

隐藏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时候就恢复显示;

Copyright © 2019- how234.cn 版权所有 赣ICP备2023008801号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务