1

Is there any way to change time after which idle timer will dim the sceen? I would like to set it in my app, for instance to 5 seconds of no user interaction.

Anindya Sengupta
  • 2,539
  • 2
  • 21
  • 27
AYMADA
  • 889
  • 3
  • 17
  • 37
  • 2
    I think this post will help you out a lot: http://stackoverflow.com/questions/273450/iphone-detecting-user-inactivity-idle-time-since-last-screen-touch – Ńike Kamstra Mar 18 '14 at 13:48
  • 1
    You can implement your own idle timer as suggested in above link. You can change the brightness of the screen when require idle time elapses. Take a [look here](http://stackoverflow.com/questions/8234981/make-the-iphone-screen-dim) – Amar Mar 18 '14 at 13:54

1 Answers1

4

The "idle timer" which invokes the lock screen is not configurable from within the application. It is the users' discretion how much time to set for the lock screen to kick in. You can probably acquire some hacks to invoke that using private APIs but Apple wouldn't like that.

There are ways to disable idle timer of course:

[[UIApplication sharedApplication] setIdleTimerDisabled:YES];

Note


Important: You should set this property only if necessary and should be sure to reset it to NO when the need no longer exists. Most apps should let the system turn off the screen when the idle timer elapses. This includes audio apps. With appropriate use of Audio Session Services, playback and recording proceed uninterrupted when the screen turns off. The only apps that should disable the idle timer are mapping apps, games, or similar programs with sporadic user interaction.

shim
  • 9,289
  • 12
  • 69
  • 108
Anindya Sengupta
  • 2,539
  • 2
  • 21
  • 27