-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call delegate method while app in background #24
Comments
Hi, Currently MZTimerLabel is not aim for working in the the background. Sorry about that. I would suggest you to save the counting timer information before you terminate the app via AppDelegate. And when you launch the app again, loop through those saved timers and determine if the timer should be ended and perform following actions. Cheers, |
I'm not terminating the app. Just closing it by clicking the home button. So it actually should work in background. I also found out something wired. The timer and delegate calls working fine in simulator, but not working in my iPhone 6. The delegate method is not called if the app is in background. Any ideas? |
So you mean when you using simulator, the delegate method called even in background? |
How long it takes you after minimize the app and the delegate should call? |
I created a property for MZTimerLabel in my Appdelegate. This way it works in background. Already tested in my other project. I got one timer with two settings: 10 seconds and 30 seconds.
Here is my delegate method:
|
let me investigate a bit. |
I'm starting a countdown timer with a click on button in my app and set time to 10 seconds. After the countdown is finished, I start another countdown timer with 30 seconds. I use the delegate method
-(void)timerLabel:(MZTimerLabel*)timerLabel finshedCountDownTimerWithTime:(NSTimeInterval)countTime
to start second timer.However, if I close the app immediatly after the first countdown timer started, the delegate method is never called and the second timer never starts. Only after I open the app.
Any idea how to start new timer while app is in background?
The text was updated successfully, but these errors were encountered: