之前已经在didFinishLaunchingWithOptions中:
let ColorNavigationBarImageAndText:UIColor = UIColor.whiteColor()
//set navi bar text and image color
UINavigationBar.appearance().tintColor = ColorNavigationBarImageAndText
//set navi bar background color
UINavigationBar.appearance().barTintColor = ColorMainApp
//UINavigationBar.appearance().barTintColor = UIColor.redColor()
//set navi bar not translucent -> makesure background color precise/correct
UINavigationBar.appearance().translucent = false了,之前的导航栏的颜色也是正常的,是白色的。
不过后来发现,此处的字体颜色是自己主动设置的:
currentTeamLabel.textColor = UIColor.whiteColor()
否则不设置的话,也是黑色的。
但是设置了UINavigationBar的tintColor,好像没生效啊。。
而进入子页面后,title的颜色是黑色的:

想要设置为白色
自己设置了:
// print("UIBarButtonItem.appearance().tintColor=\(UIBarButtonItem.appearance().tintColor)")
// UIBarButtonItem.appearance().tintColor = ColorNavigationBarImageAndText没用。
[解决过程]
1.搜:swift UINavigationBar title text color
参考:
去设置:
UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName : ColorNavigationBarImageAndText]
生效了:
字体为白色了:

然后再加上字体:
let FontNavigationBarText:UIFont = UIFont.systemFontOfSize(18)
UINavigationBar.appearance().titleTextAttributes = [
NSFontAttributeName: FontNavigationBarText,
NSForegroundColorAttributeName : ColorNavigationBarImageAndText]