Reputation: 881
I 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.
Upvotes: 5
Views: 7148
Reputation: 2377
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];
Upvotes: 14
Reputation: 10808
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;
Upvotes: 2
Reputation: 983
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.
Upvotes: -1