views:

58

answers:

2

Hi, is there a way to programmatically turn off the display in iOS? Not just turning brightness down, but off like the way the Phone App does. I am happy to use private API, since this is for personal use.

Thanks!

A: 

The only way I know of, public or private, is using the power button.

You might look at -[UIApplication setProximitySensingEnabled:(BOOL)], or -[UIApplication setIdleTimerDisabled:YES], this might lead to something useful

Adam
A: 

I do not think there is any to turn off the display (simulating iphone sleep button) except changing the brightness.

The following link might help

http://stackoverflow.com/questions/1189895/turning-screen-off

Chaitanya
GSEventSetBacklightFactor sounded like the right function, but unfortunately it's been removed from the SDK!! Any suggestions for a replacement?