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,