override func viewDidLoad() {
super.viewDidLoad()
if let line = findHairlineImageViewUnder(view: self.navigationBar) {
line.isHidden = true
}
}
func findHairlineImageViewUnder(view: UIView) -> UIImageView? {
if view is UIImageView && view.bounds.size.height <= 1.0 {
return view as? UIImageView
}
for subview in view.subviews {
let imageView = findHairlineImageViewUnder(view: subview)
return imageView
}
return nil
}
网友评论