Swift 5.1:
let titleDict: NSDictionary = [NSAttributedString.Key.foregroundColor: UIColor.white] navigationController?.navigationBar.titleTextAttributes = titleDict as? [NSAttributedString.Key : Any]