上代码:
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
self.navigationController?.navigationBar.shadowImage = UIImage()
self.navigationController?.navigationBar.titleTextAttributes=[NSAttributedString.Key.foregroundColor:UIColor.white,NSAttributedString.Key.font:UIFont.systemFont(ofSize:19)]
self.navigationController?.navigationBar.tintColor=UIColor.white
myNaviBar.setBackgroundImage(UIImage(), for: .default)
myNaviBar.shadowImage = UIImage()
myNaviBar.tintColor = UIColor.white
myNaviBar.titleTextAttributes=[NSAttributedString.Key.foregroundColor:UIColor.white,NSAttributedString.Key.font:UIFont.systemFont(ofSize:19)]
看你是自定义的导航栏的控件,还是使用了NaviVC在pop push之间需要调整顶栏的透明度
网友评论