无法在iOS上加载自定义字体 [英] Can't load custom font on iOS

查看:82
本文介绍了无法在iOS上加载自定义字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法加载自定义字体.

I'm having trouble loading a custom font.

.m文件:

- (void)viewDidLoad
{
    [label setFont:[UIFont fontWithName:@"BIO.TTF" size:32]];
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

我确实在.plist文件中键入了字体名称"BIO.TTF".字体由应用程序提供.

I did type in the font name "BIO.TTF" in the .plist file. The font is provided by the application.

推荐答案

在plist中使用文件名,并在代码中使用字体名.

Use file name in plist, and font name in your code.

这篇关于无法在iOS上加载自定义字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆