两种方法可以实现隐藏导航栏最底下的线条
方法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;