1 //去除bar下方 线 2 if ([self.navigationController.navigationBar respondsToSelector:@selector( setBackgroundImage:forBarMetrics:)]){ 3 NSArray *list=self.navigationController.navigationBar.subviews; 4 for (id obj in list) { 5 if ([obj isKindOfClass:[UIImageView class]]) { 6 UIImageView *imageView=(UIImageView *)obj; 7 NSArray *list2=imageView.subviews; 8 for (id obj2 in list2) { 9 if ([obj2 isKindOfClass:[UIImageView class]]) { 10 UIImageView *imageView2=(UIImageView *)obj2; 11 imageView2.hidden=YES; 12 } 13 } 14 } 15 } 16 }
原文:http://www.cnblogs.com/-yun/p/5212302.html