I know how to change the UINavigationBar
background image by doing
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"nabbar"] forBarMetrics:UIBarMetricsDefault];
and I know how to set the bar to different colors within each Views
..... Now I want to change the background color without using an image to a solid color from the app delegate
. I do not want to set it each time from each view and I do not want to write a CGRect
.
I tried [[UINavigationBar appearance] setBackgroundColor:[UIColor colorWithRed:33/255.0 green:34/255.0 blue:36/255.0 alpha:1.0]];
but I doesn't work and I cant find a code anywhere that works in the app delegate.
Could anyone please point me in the right direction?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…