在iphone开发的过程中,经常会用到一些本身没有的文字库,所以我们可以通过一些方法来为iphone添加这些字体库

1,把字体库文件放到项目的资源文件夹中

2,在info.plist中添加一项Fonts provided by application,在其中的一个item加入字体库我名称

3,UIFont * font = [UIFont fontWithName:@"fontname" size:20]

fontname为字体库的名称,记得不要加字体库后缀名

size为字体大小

[self.myButton.titleLabel setFont:font];

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
  • 2021-10-25
  • 2021-12-06
  • 2022-02-09
  • 2021-11-07
相关资源
相似解决方案