I need to set custom colors to my UINavigationBar buttons. I\'m doing the following thing(RGB func is a define):
- (void)viewWillAppear:(BOOL)animated
{
for
For IOS5 will have to use "setBackgroundImage:forBarMetrics:"
try this code to apply all UINavigationItem / UINavigationBar
if([[UINavigationBar class] respondsToSelector:@selector(appearance)]){ //iOS >=5.0
//use for UINavigationBar Custom image.
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageWithNamed:@"navImage.png"] forBarMetrics:UIBarMetricsDefault];
//use for UINavigationItem custom color
[[UINavigationBar appearance] setTintColor:[UIColor greenColor]];
}