bubbles
bubbles

Reputation: 881

Whats the font and color of UITableViewCell text?

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.

enter image description here

Upvotes: 5

Views: 7148

Answers (3)

B25Dec
B25Dec

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

MJN
MJN

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

Srinivas
Srinivas

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

Related Questions