Change textColor UINavigationBar tooltip?

Any (supported) way to do this? IIRC usually switches to white by itself at some point when using tintColor β€œdarker than X”, but we seem to be just on the verge of our circuit.

+4
source share
3 answers

I guess the only way to really do this is to use a custom titleView for each UINavigationItem . You can use UILabel and try to match the built-in style of the navigation header as close as you can, and then assign your own text color.

+1
source

This is possible in iOS5:

 [[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [UIColor whiteColor], UITextAttributeTextColor, nil]]; 
+11
source

And for iOS 7 you can set it to white. Please note that this will also change the color of the navigator name.

 [[[self navigationController] navigationBar] setTitleTextAttributes: @{NSForegroundColorAttributeName:[UIColor whiteColor]}]; 
0
source

All Articles