Gui*_*rme 5 iphone objective-c uibarbuttonitem ios
我在我的应用程序中有一个浅色背景的UIBarButtonItems,我想用较暗的颜色而不是标准白色着色图标.
像这样:

我能够使用色调文本
[[UIBarButtonItem appearance] setTitleTextAttributes:@{UITextAttributeTextColor: [UIColor blackColor]} forState:UIControlStateNormal];,
Run Code Online (Sandbox Code Playgroud)
但我无法弄清楚如何更改图标颜色.
有可能吗?
[myBarButton_name setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIColor yellowColor], UITextAttributeTextColor,nil] forState:UIControlStateNormal];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3572 次 |
| 最近记录: |