iOS自带字体包括:San :SF Pro、SF Pro Display、SF Compact 和 SF UI Display。
iOS自带字体包括:
1. San Francisco:SF Pro、SF Pro Display、SF Compact 和 SF UI Display。
2. Helvetica Neue:Helvetica Neue、Helvetica Neue Light、Helvetica Neue Medium 和 Helvetica Neue Bold。
3. Times New Roman:Times New Roman、Times New Roman Italic、Times New Roman Bold 和 Times New Roman Bold Italic。
4. Georgia:Georgia、Georgia Bold 和 Georgia Italic。
5. Arial:Arial、Arial Bold 和 Arial Italic。
6. Courier New:Courier New、Courier New Bold 和 Courier New Italic。
7. Impact:Impact 和 Impact Bold。
以下是使用iOS自带字体的代码示例:
// 使用SF Pro字体
label.font = UIFont(name: "SFProText-Regular", size: 18)
// 使用Helvetica Neue字体
label.font = UIFont(name: "HelveticaNeue-Light", size: 18)
// 使用Times New Roman字体
label.font = UIFont(name: "TimesNewRomanPSMT", size: 18)
// 使用Georgia字体
label.font = UIFont(name: "Georgia-Italic", size: 18)
// 使用Arial字体
label.font = UIFont(name: "ArialMT", size: 18)
// 使用Courier New字体
label.font = UIFont(name: "CourierNewPS-BoldMT", size: 18)
// 使用Impact字体
label.font = UIFont(name: "Impact", size: 18)
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(17条)