How to configure log out in iPhone 4.0 as it does not call applicationwillTerminate method in 4.0.
A:
If you want to support multi-tasking you are supposed to implement the - (void)applicationDidEnterBackground:(UIApplication *)application
method in your app delegate for saving state, as well as in - (void)applicationWillTerminate:(UIApplication *)application
to support devices that do not have multi-tasking support or pre 4.0 iOS.
But you can also force iOS to use the "old" behavior, that is to not support multi-tasking and always call applicationWillTerminate:
. To do that, you need to edit your Info.plist and add the key UIApplicationExitsOnSuspend
with a boolean value YES.
DarkDust
2010-09-28 07:13:42