Reputation: 3920
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...
Upvotes: 4
Views: 1950
Reputation: 18470
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
Upvotes: 2