chr*_*nse 22
从iOS 8.2开始,您现在可以使用UIFont.systemFontOfSize(_:CGFloat,weight:CGFloat):
UIFont.systemFontOfSize(19, weight: UIFontWeightLight)
iOS SDK为权重提供了常量:
UIFontWeightUltraLight
UIFontWeightThin
UIFontWeightLight
UIFontWeightRegular
UIFontWeightMedium
UIFontWeightSemibold
UIFontWeightBold
UIFontWeightHeavy
Run Code Online (Sandbox Code Playgroud)
当你想使用系统字体时,使用系统字体比创建基于字体名称的字体更好,因为iOS可以在iOS上更改他们的系统字体(就像他们在iOS 7中使用Helvetica Neue,现在在iOS 9中使用旧金山) .
| 归档时间: |
|
| 查看次数: |
49671 次 |
| 最近记录: |