tags:

views:

275

answers:

1

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.

+2  A: 

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:

schaechtele