设置透明导航栏时出现的底部imageview

//这段代码隐藏当前的navigation的底部的黑线

if ([self.navigationController.navigationBar respondsToSelector:@selector( setBackgroundImage:forBarMetrics:)]){

NSArray *list=self.navigationController.navigationBar.subviews;

for (id obj in list) {

if ([obj isKindOfClass:[UIImageView class]]) {

UIImageView *imageView=(UIImageView *)obj;

NSArray *list2=imageView.subviews;

for (id obj2 in list2) {

if ([obj2 isKindOfClass:[UIImageView class]]) {

UIImageView *imageView2=(UIImageView *)obj2;

imageView2.hidden=YES;

}

}

}

}

}

你可能感兴趣的:(设置透明导航栏时出现的底部imageview)