iphone auto lock value?
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.
精彩评论