iPhone screen lock notification to app
How can I be notified th开发者_如何学Cat the screen/phone was locked while my app is running? I want to suspend some timers related to refreshing the display in such cases.
I think your UIApplicationDelegate will receive the following message before the screen gets locked:
- (void)applicationWillResignActive:(UIApplication *)application
here the link to the documentation: http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/applicationWillResignActive:
精彩评论