tags:

views:

37

answers:

2

I had written an app for iPhone 3. The app calls safari and while it does that it exits out. Next time when it is called it loads from scratch.

But with iPhone 4 this behavior has changed. I find that my app was in the same where I left it before I opened safari.

How do I exit my app while it is sent to background ? (iPhone 3 like behavior)

or is there any delegate that I can use to detect if my app has gone to background and again came to forground ?

thank you !

+1  A: 

You can set a key in Info.plist called UIApplicationExitsOnSuspend to YES.

Jacob Relkin
+1  A: 

You can implement applicationWillResignActive: which is called when an app is terminating or on iOS4 if it is going into the background.

progrmr