1.下載后綴名為ttf的字體文件
2.使用"Add Files to"命令添加字體文件到工程中
3.需要先配置info.plist,加數(shù)組字段"Fonts provided by application",然后在這個(gè)數(shù)組中添加上我們的字體。例如 Cjoee.ttf。
4.代碼范例
UILabel *label = [[UILabel alloc]initWithFrame:self.view.frame];
label.font = [UIFont fontWithName:@"VCR OSD Mono" size:100];
label.text = @"Dong";
label.textAlignment = UITextAlignmentCenter;
[self.view addSubview:label];
內(nèi)容出處:http://www.tuicool.com/articles/UnQJvib