我试图在运行时使用UIFont(名称:"Times New Roman Bold",大小: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
我在这里找到了答案-iOS字体
但是感谢Rup的帮助。
我希望这个答案能帮助其他人。快乐编码:(