开发者

iPhone SDK - On Device Locked or On Device Unlocked and application shown

开发者 https://www.devze.com 2023-01-03 16:46 出处:网络
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 met

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.

0

精彩评论

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