//圖片變色
[[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.
//文字變色
//設(shè)置BarButtonItem文字顏色
[[UIBarButtonItem appearance] setTintColor:[UIColor whiteColor]];