Ios 如何获取system UITableVIewCell';的文本颜色;s的详细标签?

Ios 如何获取system UITableVIewCell';的文本颜色;s的详细标签?,ios,system,rgb,textcolor,Ios,System,Rgb,Textcolor,我真的很喜欢那种感觉 还有一些其他的系统颜色,我在UIColor文档中找不到它们的API 例如nib文件中按钮的默认文本颜色等 那么我有什么办法可以使用它们吗 我的意思是,它们只是颜色,没有风险,对吗 或者是否存在与它们相似的RGBA值?非常感谢 UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cell"]; [[cell

我真的很喜欢那种感觉

还有一些其他的系统颜色,我在UIColor文档中找不到它们的API

例如nib文件中按钮的默认文本颜色等

那么我有什么办法可以使用它们吗

我的意思是,它们只是颜色,没有风险,对吗

或者是否存在与它们相似的RGBA值?非常感谢

UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cell"];
    [[cell detailTextLabel] textColor]

textColor将只返回cells detailTextLabel的UIColor对象。

通过将模拟器的屏幕截图拉入Photoshop,我得到以下值:

[UIColor colorWithRed:0.22 green:0.33 blue:0.55 alpha:1.0]

在这个设备上看起来很像我的眼睛。但是muffe2k的答案总是有效的。

我使用
[UIColor grayColor]
表示
UITableViewCell.detailsTextLabel.textColor
。乍一看,灰色和原始颜色之间没有区别。

我想你问的是cell.detailTextLabel.textColor?打印它会产生相当于
[uicolorWithred:0.22绿色:0.33蓝色:0.53 alpha:1]
,仅供参考。从iOS 9开始,返回的值是Color:uiDeviceGBColorSpace 0.556863 0.556863 0.576471 1,或以0-255(142142147)的RGB值表示。