iOS UIFont(转载)
原文地址
标准字体和大小:- UIFont *font = [UIFont systemFontOfSize:[UIFont
systemFontSize]];
- //返回标准size,
-
- 不指定,指定斜体,指定粗体:
- UIFont *font = [UIFont systemFontOfSize:20];
- UIFont *font = [UIFont italicSystemFontOfSize:20];
- UIFont *font = [UIFont boldSystemFontOfSize:20];
-
- 指定”button标准/label标准/比标准小”用的大小:
- UIFont *font = [UIFont systemFontOfSize: [UIFont
buttonFontSize]];
- UIFont *font = [UIFont
systemFontOfSize:[UIFont labelFontSize]];
- UIFont *font =[UIFont systemFontOfSize:[UIFont
smallSystemFontSize]];
-
- 指定Font名:
- UIFont *font = [UIFont fontWithName:@"AppleGothic" size:20];
//font名就是指定字体,参考图1,