我知道怎么做来改变UINavigationBar
的背景图像
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"nabbar"] forBarMetrics:UIBarMetricsDefault];
我知道如何在每Views
条中设置不同的 colored颜色 .现在我想把背景色without using an image从app delegate
改成纯色.我不想每次都从每个视图设置它,我也不想写CGRect
.
我try 了[[UINavigationBar appearance] setBackgroundColor:[UIColor colorWithRed:33/255.0 green:34/255.0 blue:36/255.0 alpha:1.0]];
次,但没有成功,我在app delegate中找不到有效的代码.
谁能给我指一下正确的方向吗?