Getting the title label

suggest change

The underlying title label, if one exists, can be fetched using


var label: UILabel? = button.titleLabel

Objective C

UILabel *label = button.titleLabel;

This can be used to set the font of the title label, for example


button.titleLabel?.font = UIFont.boldSystemFontOfSize(12)

Objective C

button.titleLabel.font = [UIFont boldSystemFontOfSize:12];

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents