Greg
Greg

Reputation: 34818

What are the fonts used in standard UITableVIew cell UILabel & UITextFiled?

Background: I am creating a custom UITableViewCell and adding some views with text and want to match the font/size/colour that apple uses for standard controls

Questions: what are the fonts/sizes used, in say the iPhone / Settings / Safari / 1st tableviewcell for:

A) title text, ie "search engine" in my example B) current value blueish text, "google" for my example

That is if was creating the UILabel and UITextField eqivalents how would I see their fonts to look the same?

Upvotes: 0

Views: 366

Answers (1)

jbat100
jbat100

Reputation: 16827

You should be able to display it I would have thought, when you have a UITableViewCell*

NSLog(@"Cell font is %@", cell.textLabel.font);

I think it's either (not sure about the sizes)

[UIFont systemFontWithSize:]
[UIFont boldSystemFontWithSize:]

You could always make it future proof for your label by creating a default cell and setting your UILabel to the same font

label.font = cell.textLabel.font;

Upvotes: 2

Related Questions