隐藏导航栏最底下的线条
2016-03-30 12:05
761 查看
两种方法可以实现隐藏导航栏最底下的线条
方法1:使用图片或颜色设置
void)viewWillAppear:(BOOL)animated{
// Called when the view is about to made visible. Default does nothing
[super viewWillAppear:animated];
//去除导航栏下方的横线
[navigationBar setBackgroundImage:[UIImage imageWithColor:[self colorFromHexRGB:@"33cccc"]]
forBarPosition:UIBarPositionAny
barMetrics:UIBarMetricsDefault];
[navigationBar setShadowImage:[UIImage new]];
}
方法2:使用nav自带的方法
self.navigationController.navigationBar.clipsToBounds=YES;
方法1:使用图片或颜色设置
void)viewWillAppear:(BOOL)animated{
// Called when the view is about to made visible. Default does nothing
[super viewWillAppear:animated];
//去除导航栏下方的横线
[navigationBar setBackgroundImage:[UIImage imageWithColor:[self colorFromHexRGB:@"33cccc"]]
forBarPosition:UIBarPositionAny
barMetrics:UIBarMetricsDefault];
[navigationBar setShadowImage:[UIImage new]];
}
方法2:使用nav自带的方法
self.navigationController.navigationBar.clipsToBounds=YES;
相关文章推荐
- jQuery实现下滑菜单导航效果代码
- jquery实现的仿天猫侧导航tab切换效果
- PHP的栏目导航程序
- jquery实现向下滑出的二级导航下滑菜单效果
- 基于jQuery实现以手风琴方式展开和折叠导航菜单
- JS+CSS实现六级网站导航主菜单效果
- JS实现网页顶部向下滑出的全国城市切换导航效果
- JS控制按钮自动切换背景颜色(可暂停)
- javascript实现随时变化着的背景颜色
- 使用Sticky组件实现带sticky效果的tab导航和滚动导航的方法
- js实现显示当前状态的导航效果代码
- javascript实现当前页导航激活的方法
- JS+CSS实现的日本门户网站经典选项卡导航效果
- js实现点击按钮后给Div图层设置随机背景颜色的方法
- JS实现自动变化的导航菜单效果代码
- jquery实现红色竖向多级向右展开的导航菜单效果
- jQuery实现的背景动态变化导航菜单效果
- 基于jquery固定于顶部的导航响应浏览器滚动条事件
- jquery动态导航插件dynamicNav用法实例分析
- jQuery+css实现的蓝色水平二级导航菜单效果代码