UIBarbuttonItem更改textColor [英] UIBarbuttonItem change the textColor
本文介绍了UIBarbuttonItem更改textColor的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在ToolBar中有这两个按钮,并且想要更改UIBarButtons的颜色,我该怎么做?我已经尝试过setTitleTextAttributes,但是似乎没有一个带有该对象的对象?我该怎么办
I have these two buttons in a toolBar and wants to change the color of UIBarButtons how can i do such a thing? i've tried setTitleTextAttributes, but it does not seem like it has a object with that? How can i do this
UIBarButtonItem *sysDoneButton = [self createButtonWithType:UIBarButtonSystemItemDone target:self
action:@selector(actionPickerDone:)];
UIBarButtonItem *sysCancelButton = [self createButtonWithType:UIBarButtonSystemItemCancel target:self
action:@selector(actionPickerCancel:)];
推荐答案
UIBarButtonItem的颜色是其tintColor
. (或者它可以使用从放置在工具栏中的tintColor
继承.)
A UIBarButtonItem's color is its tintColor
. (Or it can use the tintColor
inherited from the toolbar you put it into.)
这篇关于UIBarbuttonItem更改textColor的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文