views:

19

answers:

1

Hi,

I need to run a method everytime the user switch the screen or return to the application (after a call, or pressing the "Home Button" and returning to the app, for example).

Is there any way to recognize this, like an event or method that is always executed when this happens?

Thank you guys in advance.

+1  A: 

Implement those 2 methods in the UIApplicationDelegate :

- (void)applicationDidEnterBackground:(UIApplication *)application

- (void)applicationWillEnterForeground:(UIApplication *)application
TheSquad
perfect, thank you!
Igor Andrade