简单记录,为后续方便查找,仅有代码片段
可以放在ViewController的基类中

if let bar = self.navigationController?.navigationBar {
    bar.backgroundColor = .themeColor
    bar.tintColor = .white
    var attrs = bar.titleTextAttributes
    if attrs == nil {
        attrs = [NSAttributedStringKey:Any]()
    }
    attrs?[NSAttributedStringKey.foregroundColor] = UIColor.white
    bar.titleTextAttributes = attrs
}