Trying to bold titleLabel of UIButton in response to delegate method being called in iOS

If you're using the standard fonts and want to make it bold, this is cleaner:

[_doneButton.titleLabel setFont:[UIFont boldSystemFontOfSize:[UIFont systemFontSize]]];

This way, you don't have to worry about the font family or size.


_doneButton.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:24];

this will make your text bold, because you are using system font, which is helvetica. I hope it helps


Swift 3

doneButton.titleLabel?.font = UIFont.systemFont(ofSize: 28, weight: UIFontWeightBold)

The following weights are available:

UIFontWeightUltraLight
UIFontWeightThin
UIFontWeightLight
UIFontWeightRegular
UIFontWeightMedium
UIFontWeightSemibold
UIFontWeightBold
UIFontWeightHeavy
UIFontWeightBlack

Note Apple's documentation, though:

// Beware that most fonts will _not_ have variants available in all these weights!