[[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:nil];
    self.timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(btnClicked:) userInfo:nil repeats:YES];
    [[NSRunLoop currentRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes];

 保持APP后台NSTimer运行

相关文章: