在我的应用程序中,我使用的是自定义字体,效果非常好。但我需要按钮文本加粗。我用谷歌搜索它只有系统字体。
代码
button.titleLabel.font = [UIFont fontWithName:@"YanaR" size:20.0];
感谢您的帮助。
最佳答案
在 fontWithName 之后你必须使用 boldSystemFontOfSize:
[button.titleLabel setFont:[UIFont fontWithName:@"Arial" size:13.f]];
[button.titleLabel setFont:[UIFont boldSystemFontOfSize:13.f]];
关于iphone - 如何在ios中加粗按钮文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11868024/