I use the appearance proxy to configure color options around the world:
//Setup custom appearances if ([UINavigationBar respondsToSelector:@selector(appearance)]) { [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"header"] forBarMetrics:UIBarMetricsDefault]; [[UINavigationBar appearance] setTintColor:[UIColor colorWithRed:96.0/255.0 green:13.0/255.0 blue:11.0/255.0 alpha:1.0]]; [[UIBarButtonItem appearance] setTintColor:[UIColor colorWithRed:96.0/255.0 green:13.0/255.0 blue:11.0/255.0 alpha:1.0]]; //rgb: 96, 13, 11 //[[UIToolbar appearance] setBackgroundImage:[UIImage imageNamed:@"header"] forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault]; [[UIToolbar appearance] setTintColor:[UIColor blackColor]]; }
This works fine, but when I click on the UIBarButtonItem, which is in my UINavigationbar, it changes color to black. How can I make sure the highlighted state is not black?
source share