Friday, September 13, 2013

How to create NSDate timer with selector and time interval

How to create NSDate timer with selector and time interval

Hi I want to create an NSDate object with the following functionality as
the NSTimer line below.
[NSTimer scheduledTimerWithTimeInterval:(slider.value * 60) target:self
selector:@selector(nextFunction) userInfo:nil repeats:NO];
So what is it that appeals to me about the above like is that I can put in
the time I want for it to countdown. Also once the timer has reached 0 the
nextFunction method is called. But I need to use NSDate for a future
operation that cannot be completed with NSTimer. In summary, I want to
create an NSDate that will countdown from whatever current value my slider
holds then upon completion of countdown to call the nextFunction method.
Thanks

No comments:

Post a Comment