I'm working on an iOS game that primarily uses accelerometer input. Previous programmers set idleTimerDisabled=YES on startup and left it that way. I recently made a change such that the idle timer is only disabled during gameplay, and is re-enabled when a level ends.
The problem is, if the play time of the level is longer than the user's idleTimer setting, the screen will grey out the moment I set idleTimerDisabled=NO. Is there a way to reset the timer upon re-enabling so that the full time increment will occur before the idleTimer dims the screen?
Disable the idle timer on a timer, using something like this.
Alternately, this is a more modern and simple approach: