Custom Fonts Xcode 4.3

后端 未结 6 1983
刺人心
刺人心 2020-12-14 05:21

I\'m trying to use this font in my project but it won\'t work. I added the .ttf file in my project and added its name in the MyApp-Info.plist under the key: Fonts provided

6条回答
  •  一生所求
    2020-12-14 05:29

    Flinks answer is a handy tool to check if your fonts are loaded properly.

    Do the following:

    [_titleLabel setFont:[UIFont fontWithName:@"chalkboard" size:_titleLabel.font.pointSize]];
    

    Make sure your fonts are included in your bundle:

    • Click your project
    • Go to build phases
    • Under 'Copy Bundle Resources', make sure your fonts are included

    Worked for me :)

提交回复
热议问题