更新时间:2022-12-05 15:50:28
p> i不会改变系统的字体=)
i would not alter the system font =)
***的方法是创建一个函数,返回你想要的字体:
best way is to create a function that will return the font you wish like this:
-(UIFont *)getFont
{
UIFont *font = [UIFont fontWithName:@"OpenSans-Bold" size:15];
return font;
}
,然后在任何地方你可以这样做按钮作为示例)
and then wherever you need that font you can do it like this (using your button as example)
[loginButton.titleLabel setFont:[self getFont];