定时器 timer 的使用

- (void) applicationDidFinishLaunching: (id) unused
{
NSTimer *_timer = [[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timerEvent) 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)timerEvent
{
// schedule code..
}
刚好要用到这个就学习一下,