iPhone SDK - On Device Locked or On Device Unlocked and application shown
I need to find a way to detect when a device has been locked, or e开发者_如何学Golse a way to detect when the device has been unlocked, and sent straight to the app where it left off. Is there some method like:
- (void)applicationDidBecomeActiveAfterLockScreen:(UIApplication *)application
For detecting when phone is being unlocked and application is becoming active again, there is
- (void)applicationDidBecomeActive:(UIApplication *)application
method.
When the device is locked, a method
- (void)applicationWillResignActive:(UIApplication *)application
is called.
Both methods belong to the UIApplicationDelegate
protocol.
See UIApplicationDelegate Protocol Reference.
精彩评论