set sleep time in iphone app
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.
精彩评论