Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

What is the default font size of textLabel and detailTextLabel?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
405 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can always set any font to those labels in code so if you want some guaranteed fixed values you'd better do that as size values may vary depending on many factors (cell's style, sdk version, os version etc).

I've tested on simulator with 4.2 SDK version and got following results (no extra properties were set for cells):

  1. UITableViewCellStyleSubtitle:

    textLabel: Helvetica Bold, size: labelFontSize+1 (18 px)
    detailsLabel: Helvetica, size: systemFontSize (14 px)

  2. UITableViewCellStyleValue1:

    textLabel: Helvetica Bold, size: labelFontSize (17 px)
    detailsLabel: Helvetica Bold, size: systemFontSize+1 (15 px)

  3. UITableViewCellStyleValue2:

    textLabel: Helvetica Bold, size: smallSystemFontSize (12 px)
    detailsLabel: Helvetica, size: labelFontSize (17 px)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...