iphone - changing font size of UIButton

ID : 274374

viewed : 87

Tags : iphoneobjective-ciphone





Top 2 Answer for iphone - changing font size of UIButton

vote vote

99

The reason that the code you're posting isn't working is probably because Arial isn't present in iOS. You can change the properties of a UIButton's titleLabel just like any other instance of UILabel. Read about that here.

So, you can change the font size with something like:

button.titleLabel.font = [UIFont systemFontOfSize:14.0]; 

You can choose a font by name, but not all fonts are available on iOS. Here's a list of ones that are.

vote vote

90

Top 3 video Explaining iphone - changing font size of UIButton







Related QUESTION?