I have a function lets say onTimer
-(void)onTimer {
* Some Operation *
}
I want to call this method like in this way…
For 10 seconds it should call on every 0.2 seconds…. then in another 10seconds, duration of calling this method should be increased….. by doing this it will appear operations getting slow from fast mode… and it will stop at the end.
Please guide.
I think this is fairly easy to accomplish with 2 timers. In the .h file, declare 2 timers:
In the .m file,
That should cancel the first timer every 10 seconds, and restart it with a new time interval. Don’t forget to invalidate the timers in the
deallocmethod. Hope that helps!