开发者

How can I switch the iPhone's screen/backlight on/off in my App

开发者 https://www.devze.com 2023-01-06 09:23 出处:网络
My app开发者_开发百科 needs to go to sleep and wake up after a user specified time interval. Using

My app开发者_开发百科 needs to go to sleep and wake up after a user specified time interval. Using

[UIApplication sharedApplication].idleTimerDisabled = YES;

I'm ignoring the idle timer. For the "sleep-mode" I'm turning the view to all black and hide the status bar. Still there's the device's background-light. Is there a way to turn it off or hit a real sleep mode - and then have it wake up again still being logged in and displaying the app (without the "slide to unlock" screen)?

Thank you & kind regards


You can't change the backlight programmatically in the iPhone SDK. However, I agree, it would be a useful thing.

0

精彩评论

暂无评论...
验证码 换一张
取 消