martingale
martingale

Reputation: 45

what is the name of the font name used in iOS as system font

I was trying to set the font of UILabel manually. Previously, I use system font black of size 48. so label.font = UIFont(name: "", size: CGFLoat(48))

what is the name it should be, to make the text of the label has the same look as system black 48.

Upvotes: 0

Views: 354

Answers (1)

matt
matt

Reputation: 535274

Try this:

label.font = UIFont.systemFontOfSize(48)

Note that if this is not the right weight, you can instead (starting in iOS 8.2) call systemFontOfSize:weight:.

Upvotes: 2

Related Questions