+ (void)initialize{
UINavigationBar *bar = [UINavigationBar appearance];
// [self buttonImageFromColor:[UIColor blackColor]]
UIImage *image = [UIImage imageNamed:@"img_nav_topbar"];
[bar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
// 设置uibarbuttonitem统一为白色
UIBarButtonItem *item = [UIBarButtonItem appearance];
NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
attributes[NSForegroundColorAttributeName] = [UIColor whiteColor];
[item setTitleTextAttributes:attributes forState:UIControlStateNormal];
// 设置导航栏返回按钮的颜色
[bar setTintColor:[UIColor whiteColor]];
// 导航栏设置黑色后,标题设置白色
NSMutableDictionary *dic = [NSMutableDictionary dictionary];
dic[NSForegroundColorAttributeName] = [UIColor whiteColor];
[bar setTitleTextAttributes:dic];
}