直接在xxxdelegete.m中的
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
方法中添加如下代码设置背景颜色,文字颜色,文字大小
[[UINavigationBar appearance] setBarTintColor:kColorWalmartBlue];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:kNavigationBarTextTintColor}];
[[UIBarButtonItem appearance] setTitleTextAttributes:@{NSFontAttributeName: [UIFont boldSystemFontOfSize:14]} forState:UIControlStateNormal];