Game Development Community

where i should put the code when i press iphone's leave button?

by Apppothk · in iTorque 2D · 12/27/2010 (2:58 pm) · 1 replies

i would like to save data when user press iphone's leave button.
where should i put the code ?

#1
12/27/2010 (3:18 pm)
Optimally in the oniPhoneResignActive() handler you can put in and implement. This will be called whenever your game is suspended, be it due to a notification / phone call, because the user goes to the task menu, because the app was suspended or because the app was terminated.

this way you can appropriately store it.

Correspondingly there is an oniPhoneBecomeActive() where you can reload the stuff again