Which Event When i close app in iOS?
This delegete will be called when your application is going to terminate.
- (void)applicationWillTerminate:(UIApplication *)app
{
}
If you are using iOS 4 or greater and with multi-tasking support, applicationWillTerminate
will not be called.
For receiving the terminate event you need to add UIApplicationExitsOnSuspend
key on your info.plist
Check this article for a good understanding about application events.
You may want to implement the
- (void)applicationWillTerminate:(UIApplication *)app;
method in your app delegate.
(Documentation)
You can handle it in
- (void)applicationWillTerminate:(UIApplication *)application
which tells the delegate when the application is about to terminate.
Alternatively, you can listen to to the UIApplicationWillTerminateNotification
notification.
See also: UIApplicationDelegate Protocol Reference