[英]How can I get the text color of a system UITableVIewCell's detail label?
我真的很喜歡這種感覺。
還有一些其他系統顏色,我在UIColor文檔中找不到它們的API,
例如nib文件中按鈕的默認文本顏色等。
那么有什么方法可以使用它們嗎?
我的意思是,它們只是顏色,沒有風險,對吧?
或者是否有任何看起來相似的RGBA值? 非常感謝!
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cell"];
[[cell detailTextLabel] textColor]
textColor將返回cellsTextLabel單元格的UIColor對象。
通過將模擬器的屏幕截圖拉入Photoshop,我得到以下值:
[UIColor colorWithRed:0.22 green:0.33 blue:0.55 alpha:1.0]
看起來非常接近我的設備。 但是muffe2k的答案總能奏效。
我將[UIColor grayColor]
用於UITableViewCell.detailsTextLabel.textColor
。 乍一看,grayColor與原始版本之間沒有區別。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.