NavigationBar text colour not changing?
- by Jeff
In my tabbar application I am adding Navigation controller in each tab.
Suppose the selected index is 0 when I opening the app.In my 3rd tab(selected index=2) I want to change the text colour of navigationbar title.And I am using the code
[[UINavigationBar appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor greenColor],UITextAttributeTextColor,nil]];
But its not changing the text color of Index 0 and 2.Colour of index 1 will change only if that tab was not clicked before changing the colour by using the above code.
I don't know whats is the issue ? Any help/code will be appreciable.