I am creating a mobile game and I have NSTimer for my stopwatch. Everything works fine, except when I minimize the application (press the main screen), or when it is interrupted, for example, by phone, NSTimer continues to run in the background when the application is not in use.
I need to cancel this timer when the application is minimized / interrupted, and create a new timer when the application resumes. What methods are processed when the application is minimized and resumed?
source
share