Reputation: 39019
How can I be notified that the screen/phone was locked while my app is running? I want to suspend some timers related to refreshing the display in such cases.
Upvotes: 3
Views: 2481
Reputation: 1130
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:
Upvotes: 3