I already implanted a code that allows 99% of the font of my application to some specific fonts:
@implementation UILabel(SizedFontName) //APPEARANCE
- (void)setSizedFontName:(id)test UI_APPEARANCE_SELECTOR
{
NSString *fontName = self.font.fontName;
CGFloat fontSize = self.font.pointSize;
if ([[fontName lowercaseString] rangeOfString:@"bold"].location != NSNotFound || [[fontName lowercaseString] rangeOfString:@"fb"].location != NSNotFound)
{
self.font = [UIFont fontWithName:nameFontBold size:fontSize];
}
else if ([[fontName lowercaseString] rangeOfString:@"italic"].location != NSNotFound)
{
self.font = [UIFont fontWithName:nameFontItalic size:fontSize];
}
else
{
self.font = [UIFont fontWithName:nameFontRegular size:fontSize];
}
}
@end
I call it with the line:
//APPEARANCE
[[UILabel appearance] setSizedFontName:nil];
That works well but I would like to have the same to complete my application with the alert views that seems to escape to that piece of code...
Thanks in advance.