1. setBarTintColor 设置颜色在导航中会变色,怎么让他不变颜色,一句代码就可以改变,加上上面[[UINavigationBar appearance] setTranslucent:NO]代码即可;
2.[[UINavigationBar appearance] setTranslucent:NO]这句话是控制导航栏颜色是否透明。
3.复制代码如下:
if (IOS7) {
[[UINavigationBar appearance] setBarTintColor:[ZGCoreUtil colorWithHexString:@"#c3401d" alpha:1.0]];
[[UINavigationBar appearance] setTranslucent:NO];
}
else {
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
}
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
4.[ZGCoreUtil colorWithHexString:@"#c3401d" alpha:1.0] 这是个颜色方法,自己去设置下就好。