开发者

How would I add a button in that would change the font size without changing font?

I have an app that I want to change the UILabels sizes without changing the font. I have tried the : systemFontOfSize property but it changes the font size and the font back to the standard 'Helvet开发者_如何学Pythonica' font.

Just to note I have UILabels that are taking multiple fonts so I don't want the: [labelName setFont: [UIFont fontWithName: @"Font" size: labelName.font.pointSize]];


In the UIFont class reference, there is a method that is called fontWithSize:. The description is:

Returns a font object that is the same as the receiver but which has the specified size instead.

You can try that, or some of the other useful methods described. Hope that Helps!


 I got it, look at this (it is a sample project for the iPhone):

    http://drp.ly/Gl9cb
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜