I'm trying to use font icons in my IOS application, I can able to display images from miscellaneous
我正在尝试在我的IOS应用程序中使用字体图标,我可以显示杂项图像
When i use the below code image is displaying
当我使用下面的代码图像显示
[Label setFont:[UIFont fontWithName:@"fontello" size:50]]; [Label setText:[NSString stringWithUTF8String:"\u2692"]];
[Label setFont:[UIFont fontWithName:@“fontello”size:50]]; [Label setText:[NSString stringWithUTF8String:“\ u2692”]];
But When i am trying to use code from private user area nothing is displaying
但是,当我尝试使用私人用户区域的代码时,没有显示任何内容
[Label setFont:[UIFont fontWithName:@"fontello" size:50]];
[Label setText:[NSString stringWithUTF8String:"\uE756"]];
Can anybody please help me, Thanks in advance!
任何人都可以帮助我,提前谢谢!
2 个解决方案
#1
1
You have to copy the custom font file to the resources by adding it in the copy files build phase.
您必须通过在复制文件构建阶段添加自定义字体文件来将其复制到资源。
#1
1
You have to copy the custom font file to the resources by adding it in the copy files build phase.
您必须通过在复制文件构建阶段添加自定义字体文件来将其复制到资源。