Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What size font is the title in a default UIButton?

What is the default font size in a UIButton?

I checked Apple's documentation but I could not find it - https://developer.apple.com/documentation/uikit/uibutton

like image 512
Katamaritaco Avatar asked Jun 26 '13 16:06

Katamaritaco


3 Answers

Its System Bold 15.0. You can check it here.

enter image description here

And you can change font using this code.

[myButton.titleLabel setFont:[UIFont fontWithName:@"Helvetica-Bold" size:13.0]];
like image 60
Dilip Avatar answered Nov 13 '22 02:11

Dilip


You can see it in the Interface Builder when you create a button, is:

System Bold 15.0

like image 28
Antonio MG Avatar answered Nov 13 '22 04:11

Antonio MG


Just by having a look at the Storyboard editor in Xcode, selecting a Round Rect Button, you can see in the Attributes Inspector that the font is "System Bold" with size 15 (pt).

like image 35
Julian Vogels Avatar answered Nov 13 '22 04:11

Julian Vogels