Skip to content
Kevin Leong edited this page Oct 10, 2016 · 1 revision

Fonts in iOS

Making a font bold

@IBOutlet weak var titleLabel: UILabel!

override func awakeFromNib() {
    titleLabel.font = UIFont.boldSystemFontOfSize(titleLabel.font.pointSize)
}

The above code block sets the titleLabel to use the bold system font and respects the point size set by Interface Builder.

Clone this wiki locally