PDA

View Full Version : HOw do you save info to return to the correct state of an iphone program after a call




springframework
May 15, 2008, 08:45 PM
what classes would u use? is their a tutorial on this somewhere online?



tacoman667
May 16, 2008, 12:03 AM
I am guessing you would dump all pertinent information of the current state of the application and forms and what forms are being used/seen currently into a cache file in the eventhandler for the application closing/suspending. You need to look in the application object methods, UIApplication or UIWindow I would venture a guess. Then have your application look for the cache file at startup. If you close the application in a certain view or state then you could just not write out the cache file, that way the application will not find it and start a new state at application load.

Just my first thoughts on the mattter. There may be a better way. I believe, and I could be wrong as I am a new Mac user/developer from a Windows Platform, that this is how Mac applications work in OS X to some degree.

springframework
May 16, 2008, 01:29 PM
thanks for the reply, its definitely 'UIApplication' that i will use to know when the application is becoming active and inactive.

do you know what class i would use to write a file to system somewhere that isnt gonna interfer with anything else.