开发者

set sleep time in iphone app

开发者 https://www.devze.com 2022-12-31 01:25 出处:网络
Can anyone suggest me how to set sleep time in iphone application? so that after that time iphone goes开发者_高级运维 in sleep mode.

Can anyone suggest me how to set sleep time in iphone application? so that after that time iphone goes开发者_高级运维 in sleep mode.

Thanks in advance.


I don't think you can do this in the current OS without getting into private API's (which will get your app rejected).

You might be able to turn off auto-lock and fake your own "unlock" swipe screen though

// turn off auto-lock
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];

and then create a XIB to fake an unlock screen. Not sure how apple feels about you doing that though, I'm just speculating.

0

精彩评论

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