I am using navigation controller in my application and want to change title color of navigationBar.
I am doing so using below code
NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor grayColor],UITextAttributeTextColor,nil];
[self.navController.navigationBar setTitleTextAttributes:dic];
One more thing I am using ARC xcode 4.2 and this code is placed on appdelegate only
It is working fine in ios 4+
but not working on below versions.
Please help me how to do this from single code on appdelegate
You can recreate the titleView like that in your viewcontroller:
the other parameters are those wich are used in the native titleView.
**
Please look at Max Strater’s answer below to have a more recent solution.
**