0

I am writing an app that disables the idle timer. How do I re-enable it prior to app crashing out or user hitting the main exit button? This could be real bad by draining the battery otherwise.

jscs
  • 63,694
  • 13
  • 151
  • 195
jdl
  • 6,151
  • 19
  • 83
  • 132

1 Answers1

1

You can reenable it in the - (void)applicationWillResignActive:(UIApplication *)application method.

You can use this: [[UIApplication sharedApplication] setIdleTimerDisabled:NO]. Don't forget to disable it again when your app becomes active.

Moshe
  • 57,511
  • 78
  • 272
  • 425