我有一个条形按钮项,仅用于显示在屏幕上执行某些操作时更新的字符串。我已将文本颜色设置为白色。但是,它以灰色显示在屏幕上。无论我将文本更改为哪种颜色,我仍然会得到浅灰色而不是所需的颜色。为什么我没有得到正确的颜色?这是我失踪的财产吗?
UIColor *buttonColor = [UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0];
_timeButton.title = [NSString stringWithFormat:@"Updated at: %@",dateString];
[_timeButton setStyle:UIBarButtonItemStylePlain];
_timeButton.tintColor = [UIColor clearColor];
[_timeButton setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIFont boldSystemFontOfSize:15], UITextAttributeFont,
buttonColor ,UITextAttributeTextColor,
nil]
forState:UIControlStateNormal];