NavigationBar text colour not changing?

Posted by Jeff on Stack Overflow See other posts from Stack Overflow or by Jeff
Published on 2013-06-28T09:30:39Z Indexed on 2013/06/28 10:21 UTC
Read the original article Hit count: 195

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.

© Stack Overflow or respective owner

Related posts about ios

Related posts about objective-c