Search code examples
ios4

in iphone 4 which method call when we close application


i want to know which method call when in iphone , application close and again open.

in iphone4 malty task felicity available . so i want to do background and foreground method for application.


Solution

  • - (void)applicationDidEnterBackground:(UIApplication *)application
    

    when the user quits an application that supports background execution.

    and

    - (void)applicationWillEnterForeground:(UIApplication *)application
    

    method is called as part of the transition from the background to the active state. You can use this method to undo many of the changes you made to your application upon entering the background.