Como detectar alterações no tamanho da fonte dinâmica a partir das configurações do iOS?
Dentro de configurações-> geral-> tamanho do texto, depois de alterar o tamanho do texto, eu teria que sair do meu próprio aplicativo para ter os tamanhos aplicados
[UIFont preferredFontForTextStyle:..]
Existe um delegado ou uma notificação para notificar meu aplicativo para reaplicar os novos tamanhos?
Atualização: Eu tentei o seguinte, mas curiosamente, o tamanho da fonte será aplicado após o BG e iniciar o aplicativo duas vezes.
- (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];
}