参考文档: https://blog.csdn.net/vladosama/article/details/50461070
[[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:nil];
self.timer = [NSTimerscheduledTimerWithTimeInterval:1 target:selfselector:@selector(timeFireMethod)userInfo:nilrepeats:YES];
[[NSRunLoop currentRunLoop] addTimer:self.timerforMode:NSRunLoopCommonModes];
网友评论