您的位置:首页 > 产品设计 > UI/UE

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]];

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: