Creating a Timer
suggest changeThis will create a timer to call the doSomething method on self in 5.0 seconds.
[NSTimer scheduledTimerWithTimeInterval:5.0
target:self
selector:@selector(doSomething)
userInfo:nil
repeats:NO];
Setting the repeats parameter to false/NO indicates that we want the timer to fire only once. If we set this to true/YES, it would fire every five seconds until manually invalidated.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents