标签:appear ted navbar nav min 隐藏 color ack 运行
首先创建
@interface TestVC()
{
UIImageView *navBarHairlineImageView;
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
navBarHairlineImageView.hidden = YES;
}
- (UIImageView *)findHairlineImageViewUnder:(UIView *)view {
if ([view isKindOfClass:UIImageView.class] && view.bounds.size.height <= 1.0) {
return (UIImageView *)view;
}
for (UIView *subview in view.subviews) {
UIImageView *imageView = [self findHairlineImageViewUnder:subview];
if (imageView) {
return imageView;
}
}
return nil;
}在viewDidLoad中加入
navBarHairlineImageView =[self findHairlineImageViewUnder:self.navigationController.navigationBar];
然后就完成了,可以运行看效果了
标签:appear ted navbar nav min 隐藏 color ack 运行
原文地址:http://www.cnblogs.com/yuShen/p/6731598.html