开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜