I'd like to use UIAppearance
to set the size of the font of all the UIButtons
in my app to 15, and the size of the font in all the UILabels
in my app to 10. Here's what I have:
UIFont *dinMediumFont = [UIFont fontWithName:@"DINPro-Medium" size:15];
[[UILabel appearanceWhenContainedIn:[UIButton class], nil] setFont:dinMediumFont];
UIFont *dinBoldFontBig = [UIFont fontWithName:@"DINPro-Bold" size:10];
[[UILabel appearanceWhenContainedIn:nil] setFont:dinBoldFontBig];
However, I'd like the font of the buttons in UINavigationBars
to be smaller, I tried adding this:
UIFont *smallerFont =[UIFont fontWithName:@"DINPro-Medium" size:15];
[[UILabel appearanceWhenContainedIn:[UIButton class], [UINavigationBar class], nil] setFont:smallerFont];
but the font is staying as the default... Why could that be?