我正在为 UIButton
headingButton.titleLabel.textColor = [UIColor colorWithRed:36/255.0
green:71/255.0
blue:113/255.0
alpha:1.0];
它不会改变我在另一个工作代码中使用的相同代码的颜色.
It's not changing color same code I'm using in another code it's working.
使用
Objective-C
[headingButton setTitleColor:[UIColor colorWithRed:36/255.0 green:71/255.0 blue:113/255.0 alpha:1.0] forState:UIControlStateNormal];
斯威夫特
headingButton.setTitleColor(.black, for: .normal)
这篇关于UIButton 标题文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!