The world has changed after Apple added multitasking feature to iOS4. Before that day, I used to save my data using the notification UIApplicationWillTerminateNotification
, this means when the user presses the Home button to close the application, the notification will pull the trigger, and your application can do anything you want it to do during the terminating process. Before the day multitasking come, we are safe with this idea.
But after we have the multitasking feature goes with our beloved iOS4, a new deal has been signed. When the user presses the Home button, the application will be running on the “background”, and waiting for our user to use it again. That means the application will not be terminated. That means the notification UIApplicationWillTerminateNotification
might not be fired. Not even when we kill the application process while entering the list of “background“‘s application. I have tried, I am not sure if I right or not but my application couldn’t do the same thing like it used to. In my opinion, UIApplicationWillTerminateNotification
isn’t the right notification for my application more, I have to find its replacement.
And thanks God, I found the UIApplicationDidEnterBackgroundNotification
notification. For now, after the application entered the “background”, the notification will pull the trigger, and our awaiting actions will be fired. Cool hah?
P/S: I am not implement the comment function, so if you have feedback or any suggestion, please reblog or send me an email to nguyen at ducban dot com
. Please note that I am a newbie of iPhone Developer World and I need your help.

Xem đầy đủ bài viết tại http://feedproxy.google.com/~r/ducban/~3/QSUjtGc34Cw/873746409