fileprivate func hideBottonLine(views:Array<UIView>){
for i in 0..<views.count
{
let view:UIView = views[i]
if view.height < 1 {
view.isHidden = true
}else if view.subviews.count > 0 {
hideBottonLine(views: view.subviews)
}else if view.subviews.count == 0{
return
}
}
}
调用
hideBottonLine(views: (self.navigationController?.navigationBar.subviews)!)
网友评论