Creating a Timer

suggest change

This 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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


NSTimer:
*Creating a Timer

Table Of Contents