更新时间:2023-12-01 22:07:10
最后从photoshop中获得了.otf格式的"Pictos"字体.在Photoshop中可以使用Pictos字体.
Finally got "Pictos" font in .otf format from photoshop. Pictos font is available in photoshop.
步骤:
修改application-info.plist文件.将密钥应用程序提供的字体"添加到
新行.为已添加的pictos字体添加一项.
Modify the application-info.plist file. Add the key "Fonts provided by application" to a
new row. Add one item for pictos font you have added.
创建按钮并设置Pictos字体.
Create button and set Pictos font.
UIButton *homeButton = [UIButton buttonWithType:UIButtonTypeCustom];
homeButton.frame = CGRectMake(0, 0, 34 , 33);
[homeButton setTitle:@"H" forState:UIControlStateNormal];
homeButton.titleLabel.font = [UIFont fontWithName:@"Pictos" size:22];
注意:您可以通过设置适当的标题文本来设置不同的图标.
Note: You can set different icons by setting proper title text.