Prevent iPhone from locking automatically, but enable screen simulations

I have an application that works in a busy hands environment, so the user rarely touches the device. Of course, the phone goes into auto-lock, and my application stops working. I used this code:

[[UIApplication sharedApplication] setIdleTimerDisabled:YES]; 

to prevent the device, and this is normal. However, I would still like the screen to be dim. The above code keeps the screen from automatically dimming, as well as auto-locking.

This question shows me how I can hide the screen manually, and this can be a pretty good solution. But I would prefer to use system settings rather than application settings.

So, how can I prevent auto-blocking while still getting auto-dimming?

+6
source share

All Articles