¿Cómo activar NSTimer de inmediato?
Necesito llamar a un método cuando se inicie mi aplicación y luego llamar al mismo método cada 5 segundos.
Mi código es bastante simple:
// 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];
¿Hay una opción para el temporizador de modo que se dispare de inmediato y luego cada 5 segundos?