Whats the font and color of UITableViewCell text?
开发者_如何学CI want to replicate the UITableViewCellStyleValue1
provided by apple, I just can't figure out the font and size of the text in the cells in the right. Specifically the font and color of numbers below is, 28 1 6843.
Use the default font with the label with the
size = [UIFont boldSystemFontOfSize:16]
;
and the color of the number you are looking for is
label.textColor = [UIColor colorWithRed:81.0/255.0 green:102.0/255.0 blue:145.0/255.0 alpha:1.0];
The area on the right of a UITableViewCell
is called the detailTextLabel
. You can just create a UITableViewCell
with the style you want and read the UIFont
and UIColor
values from it.
UITableViewCell* cell = [[[UITableViewCell alloc] initWithStyle: UITableViewCellStyleValue1 reuseIdentifier: @"Example"] autorelease];
UIFont* rightFont = cell.detailTextLabel.font;
UIColor* rightColor = cell.detailTextLabel.textColor;
ITableViewCellStyleValue1 A style for a cell with a label on the left side of the cell with left-aligned and black text; on the right side is a label that has smaller blue text and is right-aligned. The Settings application uses cells in this style.
精彩评论