Como acionar o NSTimer imediatamente?
Eu preciso chamar um método quando meu aplicativo é iniciado e, em seguida, chamar o mesmo método a cada 5 segundos.
Meu código é bem simples:
// Call the method right away
[self updatestuff:nil]
// Set up a timer so the method is called every 5 seconds
timer = [NSTimer scheduledTimerWithTimeInterval: 5
target: self
selector: @selector(updatestuff:)
userInfo: nil
repeats: YES];
Existe uma opção para o temporizador, por isso é acionado imediatamente e a cada 5 segundos?