iOS中中文字体种类特别的少,有时为了增加字体的艺术效果需要添加自定义的字体。其实在iOS中添加自定义字体很简单,4步就可搞定:
1,在Info.plist中加入名为UIAppFonts的array
2,把*.ttf 和*.otf文件加入到项目当中,比如说是MyScript.ttf
3,把文件名添加到UIAppFonts数组里面
4,在程序中用下面的命令来调用
// use the font name here, not the filename
UIFont *myCustomFont = [UIFont fontWithName: @"MyScript" size:30];
so easy!