Prevent iPhone auto-lock, but permit screen dimming
Asked Answered
R

0

6

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

    [[UIApplication sharedApplication] setIdleTimerDisabled:YES];

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

This question shows me how I can dim the screen manually, and that just may be a good enough solution. But I'd rather use system settings, not app settings.

So how can I prevent auto-lock while still getting the auto-dim?

Recognizance answered 27/3, 2013 at 20:32 Comment(4)
maybe you can write some code that slowly reduces the screen brightness inside a timer. I don't think the framework provides this functionality.Narrowminded
yeah, I might have to, was hoping to avoid that.Recognizance
What did you come up with in the end?Falconer
Had to do it manually.Recognizance

© 2022 - 2024 — McMap. All rights reserved.