IOS 去掉导航栏(UINavigationBar)下方的横线
2016-04-01 17:06
507 查看
这是导航栏的问题,将下边的代码放在 viewWillAppear 方法中就可以实现效果:
- (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]];
}
- (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]];
}
相关文章推荐
- UITableView的cell向左滑出有删除,修改等选项
- android roboguice 笔记
- Your build settings specify a provisioning profile with the UUID, no provisioning profile was found
- CUICatalog: Invalid asset name supplied: (null), or invalid scale factor: 2.000000错误解决方案
- Android ui 透明度设置
- 62. Unique Paths
- 为什么request.getParameterValues("XXX")接收select数组的值为null
- 在使用jsonCPP过程中,使用Debug正常,但是使用Relese出现找不到json_value.asm
- 怎么强制一个UIViewController页面从竖屏进入横屏
- 关于tableViewCell行数移动的方法。记得跟后台数据交互,这只是本地展示时候的样子。
- Android Volley完全解析(三),定制自己的Request
- request 对象
- c#中获取服务器IP,客户端IP以及Request.ServerVariables详细说明
- lintcode-medium-N Queens II
- lintcode-medium-N Queens
- UITextField 解决限制文字长度不准确的问题
- Vue.js实例练习
- 仿 UIAlertView动画效果
- Android之UI控件
- 【转载】循环结构中break、continue、return和exit的区别