Necesito llamar a un método cuando se inicia mi aplicación y luego llamar al mismo método cada 5 segundos.¿Cómo desencadenar NSTimer de inmediato?
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 disparo por lo que es inmediato y luego cada 5 segundos?
sintaxis muy bonito! – loretoparisi