ios下自定义字体

来源:互联网 发布:java api 1.7 苹果版 编辑:程序博客网 时间:2024/05/19 17:56

文档:Applications that want to use custom fonts can now include those fonts in their application bundle and register those fonts with the system by including the UIAppFonts key in their Info.plist file. The value of this key is an array of strings identifying the font files in the application’s bundle. When the system sees the key, it loads the specified fonts and makes them available to the application.


只需要在info.plist中添加UIAppFonts即可,然后在array中添加字体名即可,可添加多个字体。这项特性是3.2添加到sdk中的,3.2以前的版本无法使用。注意:ios5之前好像不支持otf格式的字体,所以最好用ttf格式的字体



原创粉丝点击