Xcode中添加自定义字体

2,339 阅读1分钟

​三步走:

  • Info.plist文件中加入Fonts provided by application,填写文件名称加后缀。如图:在这里插入图片描述
  • 前往TARGETS -> Build Phases -> Copy Bundle Resources,如果这里没有找到自定义字体,需要添加进去。
  • 可以使用了:
UIFont(name: "FjallaOne-Regular", size: 40)