iOS Foundation:系统字体大小 [英] iOS Foundation: system font size
问题描述
我想知道iOS应用程序tableView中的systemFontSize对于textLabel是否始终相同?这取决于样式?
I would like to know if systemFontSize in iOS app tableView is always the same for textLabel? This is are depening to style?
例如当我 NSLog(@%f,[UIFont systemFontSize]);
我得到14.0。它总是一样的吗?
For example when I NSLog(@"%f",[UIFont systemFontSize]);
I'm getting 14.0. Is this are always the same?
还有更多:如何在不改变font-family的情况下改变字体大小(假设我的plist中有自己的字体) 。
And what's more: How can i change font size without changing the font-family (assuming that i have my own fonts in my plist).
我试过:
cell.textLabel.font = [UIFont fontWithName:@"Sansation-Light" size:12.0];
但是UIFont总是想要我的fontname / family。我怎样才能避免这种情况,并且我的屏幕上只有一种字体并且只改变尺寸?
But UIFont always want for me fontname/family. How can i avoid that and have one font to all my screen and changing only size?
推荐答案
系统字体描述如下:
+ (CGFloat)labelFontSize;//Returns the standard font size used for labels.
+ (CGFloat)buttonFontSize;//Returns the standard font size used for buttons.
+ (CGFloat)smallSystemFontSize;//Returns the size of the standard small system font.
+ (CGFloat)systemFontSize;//Returns the size of the standard system font.
您可以更改字体大小而不使用如下字体系列:
and you can change the font size without the font family like this :
cell.textLabel.font = [UIFont systemFontOfSize:14];
这篇关于iOS Foundation:系统字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!