Tuesday, May 6, 2014

Schedule Timer on iPhone apps

Function nameOfTheFunctionToBeCalled will be called after 6 secs.

NSTimeInterval timeInterval = 6; //seconds
        [NSTimer scheduledTimerWithTimeInterval:timeInterval
                                         target:self
                                       selector:@selector(nameOfTheFunctionToBeCalled)
                                       userInfo:nil

                                        repeats:NO];


No comments:

Post a Comment