有些时候需要隐藏导航栏的黑线,使导航栏可以和下面的view看起来好像一体
-(void)viewDidLoad {
[self enumerationSubView:self.navigationController.navigationBar.subviews];
}
- (void)enumerationSubView:(NSArray *)array {
for (UIView *view in array) {
if (view.bounds.size.height <= 1) {
[view removeFromSuperview];
break;
} else {
[self enumerationSubView:view.subviews];
}
}
}