#pragma mark - 定制全局的Bar
-(void)customAllBar{
//定制所有的Bar的背景颜色和标题外观
[UINavigationBar appearance].barTintColor = [UIColor lightGrayColor];
//NSDictionary :@{属性名:对象}
[UINavigationBar appearance].titleTextAttributes = @{NSFontAttributeName : [UIFont systemFontOfSize:40],NSForegroundColorAttributeName : [UIColor yellowColor] };
}
#pragma mark - 定制全局的ToolBarButtonItem
-(void)customToolBarButtonItem{
//修改的是NavigationBar和Toolbar上得所有不是图片的NavigationItem的背景
//[[UIBarButtonItem appearance] setBackButtonBackgroundImage:[UIImage imageNamed:@"header_bg"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
//修改所有在UIToolbar出现过的UIBarButtonItem把他们的背景变成Blue
[[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UIToolbar class]] ] setTintColor:[UIColor blueColor]];
}