views:

89

answers:

1

From JavaScript I am used to create an interval and specify the delay for re-calling the function, until I stop the interval. Is there something similar available on the iPhone? Any good links are highly appreciated. This goes to community wiki.

+5  A: 
//create and start timer

[NSTimer scheduledTimerWithTimeInterval: 0.05 target: self selector: @selector(timerMethod:) userInfo: nil repeats: YES];

// method works 20 times per second
-(void) timerMethod: (NSTimer*)theTimer {
NSLog(@"timer is working");
}
oxigen