/ Published in: Objective C

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
.h file // declare timer NSTimer *countDownTimer; .m file // stop the timer before it is used // this is useful sometimes if not the timer might be run twice [self.countDownTimer invalidate]; // this will create and RUN/SCHEDULE the timer all at the same time. self.countDownTimer = [NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(callBackFunctionHere:) userInfo:nil repeats:NO];
Comments
