Custom Fonts only available when set in Interface Builder

前端 未结 6 1087
暖寄归人
暖寄归人 2021-01-13 08:50

I have added a custom font to my project. It is included in the target, and it is added in the plist. When I try to use it programmatically it doesn\'t work, and it doesn\'t

6条回答
  •  星月不相逢
    2021-01-13 09:32

    Matt did a great job of isolating the problem... I was not loading the font correctly.

    In my case the problem was in the Info.plist.

    I was listing the font in the Info.plist using its name. This is incorrect. You are supposed to list the font in the Info.plist using its file name.

提交回复
热议问题