" Swanky and Moo Moo& quot;字体在iOS中不起作用 [英] "Swanky and Moo Moo" font is not working in ios

查看:52
本文介绍了" Swanky and Moo Moo& quot;字体在iOS中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用程序中使用的是"Swanky and Moo Moo",但它显示的字体风格就像系统字体一样..

I am using "Swanky and Moo Moo" in my application, but it displays the font style as like of system font..

这是我的代码....

myLabel.font=[UIFont fontWithName:@"Swanky and Moo Moo" size:16];

我已经引用了以下链接.

I have refer the following links..

iOS :如何设置UILabel的非系统字体系列,样式和大小?

http://kgriff.posterous.com/45359635

但是那对我没有用.......

But thats are not useful for me.......

anone能否告诉我如何将myLabel字体样式设置为 Swanky and Moo Moo ?

Can antone tell me that how to set the myLabel font style as Swanky and Moo Moo??

推荐答案

  1. 使用XCode将自定义字体文件添加到项目中 资源.
  2. 将应用程序提供的键字体添加到您的信息列表中.(数组键)
  3. 对于每种字体,请添加完整的字体文件名以及扩展名,例如 项.
  4. 现在您可以将字体用作UIFont * customFont = [UIFont fontWithName:fontName size:fontSize];
  5. catch字体名称不是每次的字体文件名.....
  6. 您可以安装字体文件以检查其字体名称....使用 名称,然后您会被排序....
    注意:-如果仍然有用,请进入构建阶段->复制捆绑软件资源并添加所有字体文件
  1. Add your custom font files into your project using XCode as resources.
  2. Add key font provided by application to your info plist.(array key)
  3. For each font add the full font file name along with extension as item into the key.
  4. Now you can use the font as UIFont *customFont = [UIFont fontWithName:fontName size:fontSize];
  5. The catch the font name is not the font file name every time.....
  6. you can install the font file to check its font name....use that name and you are sorted....
    Note:- If it still dosent work go to build phases ->copy bundle resources and add all your font files

这篇关于" Swanky and Moo Moo& quot;字体在iOS中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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