4
votes

I already found this article here Set a default font for whole iOS app? and I basically have the same question.

I want to set the default font for my whole application but without having to specify the font size. I Have different labels with different sizes in my app. I just want to change the font... not the size!

Thanks for helping...

1
did you make any progress? I'm having the same issue. - Simon
Unfortunately not, no.. sorry I ended up using the default font for now... The requirement for the custom font wasn't that high! - Georg

1 Answers

2
votes

I think it is too late, but for whom who has the same question, there is a two solution for changing the app font without having to specify the font size.:

The first is workaround wich is iterating over all the labels in your UIView and change the labels font, check this question and the answers: How to set a custom font for entire iOS app without specifying size.

The Second is creating a Category for your control:

@implementation UILabel (MyCustomLabel)

-(void)awakeFromNib{
    float fontSize = [self.font pointSize];
    self.font = [UIFont fontWithName:@"MyCustomFont" size:fontSize];
}

@end