Storyboard -> NavigationBar -> 转到属性检查器 -> 标题文本属性
或在ViewController中手动设置
Swift 4:
self.navigationController?.navigationBar.titleTextAttributes = [
NSAttributedStringKey.foregroundColor: UIColor.white,
NSAttributedStringKey.font: UIFont.systemFont(ofSize: 17, weight: .bold)
]
Swift 3:
self.navigationController?.navigationBar.titleTextAttributes = [
NSForegroundColorAttributeName: UIColor.white,
NSFontAttributeName: UIFont.systemFont(ofSize: 17, weight: .bold)
]