- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
UIColor * mainColor = [UIColor colorWithRed:61 / 255.0f green:189 / 255.0f blue:119 / 255.0f alpha:1.0f];
//单例获取NavigationBar
UINavigationBar * navigationBar = [UINavigationBar appearance];
//改变背景颜色
[navigationBar setBarTintColor:mainColor];
//改变标题颜色
[navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
//改变Item颜色
[navigationBar setTintColor:[UIColor whiteColor]];
//设置tab被选中的颜色
UITabBar * tabBar = [UITabBar appearance];
[tabBar setTintColor:mainColor];
return YES;
}