iOS 6,如何着色UIBarButtonItem白色图标?

Gui*_*rme 5 iphone objective-c uibarbuttonitem ios

我在我的应用程序中有一个浅色背景的UIBarButtonItems,我想用较暗的颜色而不是标准白色着色图标.

像这样:

在此输入图像描述

我能够使用色调文本

[[UIBarButtonItem appearance] setTitleTextAttributes:@{UITextAttributeTextColor: [UIColor blackColor]} forState:UIControlStateNormal];,
Run Code Online (Sandbox Code Playgroud)

但我无法弄清楚如何更改图标颜色.

有可能吗?

iPa*_*tel 0

[myBarButton_name setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIColor yellowColor], UITextAttributeTextColor,nil] forState:UIControlStateNormal];
Run Code Online (Sandbox Code Playgroud)