iPhone中定时器NSTimer使用方法

- (void) applicationDidFinishLaunching: {

NSTimer *_timer = [[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(onTimer) userInfo:nil repeats:YES] retain];

}

// call function when time is up (in this exemple :1 second. to change it, change scheduledTimerWithTimeInterval: 1 to value in second)
- (void)onTimer
{
}

 

你可能感兴趣的:(UP)