代码如下:
title = "测试字体"
navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName:UIColor.orange,
NSFontAttributeName : UIFont.systemFont(ofSize: 25)
]
//NSForegroundColorAttributeName : 设置颜色
//NSFontAttributeName : 设置字体