I have seen on an iOS application 'Sleep Cycle Alarm Clock' that when the iPhone is facing screen down (towards the floor) they have managed to dim the back light of the screen. I have been searching all over the internet and can't find the API that provides this functionality.
I am guessing that they achieve this by measuring acceleration on the device from gravity and dimming the back light accordingly, which I have no problem with. I just don't know how they have dimmed the back light (including the status bar!). It's not a semi-transparent black UIView overlayed on the superview, the light definitely switches off.
The detection isn't the issue, it's the dimming that I don't know how to do.
Can anyone point me to the correct method/API documentation? I'm using the iOS 6 SDK.
Thanks
EDIT:
Sorry guys, appears that I was wrong. Further investigation leads me to believe they haven't dimmed the backlight. The instructions stay over the superview temporarily. I think they actually overlay a black image and remove the status bar. My apologies! To get around the orientation lock for orientation detection I think they use the accelerometer.