¿Cómo detectar cambios de tamaño de fuente dinámicos desde la configuración de iOS?
Configuraciones internas-> general-> tamaño del texto, después de cambiar el tamaño del texto, tendría que salir de mi propia aplicación para que se apliquen los tamaños
[UIFont preferredFontForTextStyle:..]
¿Hay algún delegado o notificación para notificar a mi aplicación que vuelva a aplicar los nuevos tamaños?
Actualización: Intenté lo siguiente pero, curiosamente, el tamaño de la fuente se aplicará después de I BG e iniciará la aplicación DOS VECES.
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(fromBg:) name:UIApplicationDidBecomeActiveNotification object:nil];
}
-(void) fromBg:(NSNotification *)noti{
self.headline1.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline];
self.subHeadline.font = [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline];
self.body.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
self.footnote.font = [UIFont preferredFontForTextStyle:UIFontTextStyleFootnote];
self.caption1.font = [UIFont preferredFontForTextStyle:UIFontTextStyleCaption1];
self.caption2.font = [UIFont preferredFontForTextStyle:UIFontTextStyleCaption2];
// [self.view layoutIfNeeded];
}