UIBarButtonItem图片颜色改变了

//图片变色

[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"barbuttonicon_back"] style:UIBarButtonItemStylePlain actionBlick:^{

      [self.navigationController popViewControllerAnimated:YES];

}]

This is clearly explained in Apple's document, "Toolbars": Bar Button Item Icons Any bar button in a toolbar can have a custom image instead of text. You can provide this image to your bar button item during initialization. Note that a bar button image will be automatically rendered as a template image within a toolbar, unless you explicitly set its rendering mode to UIImageRenderingModeAlwaysOriginal. For more information, see Template Images.


//文字变色

//设置BarButtonItem文字颜色

[[UIBarButtonItem appearance] setTintColor:[UIColor whiteColor]];

你可能感兴趣的:(UIBarButtonItem图片颜色改变了)