// style the navigation bar
UIColor* navColor = [UIColor colorWithRed:0.175f green:0.458f blue:0.831f alpha:1.0f];
[[UINavigationBar appearance] setBarTintColor:navColor];//导航栏背景色
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];//barButton颜色
[[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]}];//标题颜色
// make the status bar white
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;//状态栏样式
That's it! That's all you need!
转载于:https://my.oschina.net/javaTechLover/blog/341682