|
|
@@ -262,8 +262,12 @@
|
|
|
curTitle = [[NSString alloc] initWithFormat:@"%@(%ld)",curTitle,countdownSeconds];
|
|
|
[but setTitle:curTitle forState:UIControlStateNormal];
|
|
|
|
|
|
+ [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
|
|
|
+ [[UIApplication sharedApplication] endBackgroundTask:UIBackgroundTaskInvalid];
|
|
|
+ }];
|
|
|
[curTimer invalidate];
|
|
|
curTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(handleCountdownFun) userInfo:nil repeats:YES];
|
|
|
+ [[NSRunLoop mainRunLoop] addTimer:curTimer forMode:NSRunLoopCommonModes];
|
|
|
}
|
|
|
}
|
|
|
|