lajos lajos - 1 year ago 87
iOS Question

How do I prevent the iPhone screen from dimming or turning off while my application is running?

I'm working on an app that requires no user input, but I don't want the iPhone to enter the power saving mode.

Is it possible to disable power saving from an app?

Answer Source
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download