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

Categories

0 votes
397 views
in Technique[技术] by (71.8m points)

iphone - Default UITableViewCellStyleSubtitle font size?

What is the default font size of textLabel and detailTextLabel?

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

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)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...