Standard font for iOS application

I already found this article here. Set the default font for the entire iOS application? and I basically have the same question.

I want to set the default font for my entire application , but without specifying the font size . I have different shortcuts of different sizes in my application. I just want to change the font ... not the size!

Thanks for the help...

+4
source share
1 answer

I think it's already too late, but for anyone who has the same question, there are two solutions to change the font of the application without specifying the font size .:

The first is a workaround that iterates through all the shortcuts of your UIView and changing the font of the labels, check this question and answers: How to set a custom font for the entire iOS application without specifying a size .

The second creates a category for your management:

@implementation UILabel (MyCustomLabel) -(void)awakeFromNib{ float fontSize = [self.font pointSize]; self.font = [UIFont fontWithName:@"MyCustomFont" size:fontSize]; } @end 
+2
source

Source: https://habr.com/ru/post/1396627/


All Articles