开发者

iphone auto lock value?

开发者 https://www.devze.com 2023-01-29 13:32 出处:网络
Isn\'t possibl开发者_JS百科e to retrieve auto lock value? Or anyone know how to modify the auto lock time like those existing alarm application?

Isn't possibl开发者_JS百科e to retrieve auto lock value? Or anyone know how to modify the auto lock time like those existing alarm application?

Thanks.


Yes Jason is right. you can use [application setIdleTimerDisabled:YES]; to stop the autosleep. But there is no way to access the auto lock value.

Regards, Raxit


You can do it. you need to implement the following methods

- (void)applicationWillResignActive:(UIApplication *)application

This gets called when the phone is locked. In this method I would store the time and then impliment this method on the app delegate.

- (void)applicationDidBecomeActive:(UIApplication *)application

This function will be called when unlocking the phone. Use the time you stored when locking the time to determine how long it has been.

You can use this two methods for custom implementation of auto lock interval.

0

精彩评论

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