extension UINavigationController {
override open func viewDidLoad() {
super.viewDidLoad()
let coloredAppearance = UINavigationBarAppearance()
coloredAppearance.configureWithOpaqueBackground()
coloredAppearance.backgroundColor = UIColor(Color.blue) //背景颜色
coloredAppearance.titleTextAttributes = [.foregroundColor: UIColor(Color.blue)] //大标题颜色
coloredAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor(Color.blue)]
UINavigationBar.appearance().standardAppearance = coloredAppearance
UINavigationBar.appearance().compactAppearance = coloredAppearance
UINavigationBar.appearance().scrollEdgeAppearance = coloredAppearance
UINavigationBar.appearance().tintColor = UIColor(Color.blue) //左上角返回标记
}
}