去掉顶部导航栏1px的下划线

UIImageView*imageView = [selffindHairlineImageViewUnder:self.navigationController.navigationBar];

imageView.hidden=YES;


去掉顶部导航栏1px的下划线_第1张图片
去掉顶部导航栏1px的下划线_第2张图片


//去掉顶部导航栏1px的下划线

- (UIImageView*)findHairlineImageViewUnder:(UIView*)view

{

if([viewisKindOfClass:UIImageView.class] && view.bounds.size.height<=1.0)

{

return(UIImageView*)view;

}

for(UIView*subviewinview.subviews)

{

UIImageView*imageView = [selffindHairlineImageViewUnder:subview];

if(imageView)

{

returnimageView;

}

}

returnnil;

}

你可能感兴趣的:(去掉顶部导航栏1px的下划线)