私はそれが解放されるべきである後8時間(28800秒)まで数えなければならないタイマーを持っています
タイマーをバックグラウンドで実行し続ける方法や、アプリケーションを閉じたときに実行し続ける方法を知りたいですか?
これはNSTimerです:
stopWatchTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
target:self
selector:@selector(updateTimer)
userInfo:nil
repeats:YES];
これが私の状態です:
counter++;
if (counter >= 28800) {
[stopWatchTimer invalidate];
counter =0;
timeLabel.text = @"Time Out";
}