ios13 - 无法在 Swift 5 中以编程方式使用“Times New Roman Bold”
问题描述
我正在尝试在运行时使用 UIFont(name: "Times New Roman Bold", size: 30.0) 但它正在返回nil
这是我的代码 -
lblHeader.font = UIFont(name: "Times New Roman Bold", size: 30.0)
但是当我在控制台中打印时lblHeader
返回。SFUI-Regular
我试过以下组合但没有运气 -
Times New Roman Bold
Times New Roman-Bold
Times New Roman-bold
Times New Roman bold
TimesNewRoman Bold
TimesNewRoman-Bold
解决方案
推荐阅读
- apache-httpclient-4.x - Apache HTTP 客户端流利
- python - 自定义ttk.Entry小部件类焦点问题,python 3
- android - 将 apk android install 交付到 iframe 网站
- python - 使用新密钥对更新证书
- rust - Rust 中的库 crate 和普通 crate 有什么区别?
- docker - Dockerfile build: FileNotFoundError: [Errno 2] No such file or directory
- sql - 如何查询以在一次查询中捕获新近度和规模?
- redis - 用于内存刷新的 Redis 脚本
- python - 如何使用 keras 处理循环神经网络的 pandas 数据帧?
- c - 如何从标准输入中获取在 C 中具有前导空格的字符串输入?