views:

64

answers:

3

I don't know if this is an iOS4 thing or something, but basically say I have a few screens in my app. Now, when I hit the home button and relaunch my app it launches the app on the screen where I left off. It's almost like it's not restarting my app, but resumes it. I don't want it to do that. (I'd like it to show my splash screen main menu, etc. )

Does anyone know how to resolve this? thanks

+1  A: 

I think this should help you. Basically what you need to do is disable the multi-tasking features of iOS4.

http://www.iphonedevsdk.com/forum/iphone-sdk-development/60989-disable-multi-tasking-ios4-application.html

fnCzar
A: 

That's exactly the multi-tasking you asked about yesterday working behind the scenes. You need to opt-out if you want that behavior. See answers to your previous question here. Have you read the answers there???

Yuji
haha, you're good. yes, I read your answer that's why in this question I said "i think it's an ios4 thing" because i remembered what you said about multitasking. i guess i just didn't know for sure if multitasking meant resuming...
Shnitzel
+3  A: 

In iOS 4, apps are suspended (not terminated) when the home button is pressed. When you "relaunch" the app, it is simply moved to the foreground. If you want your app to terminate when the user presses the home button, set the value of UIApplicationExitsOnSuspend to YES in your app's Info.plist file. If you do this, when the user taps the home button the applicationWillTerminate: method of your app delegate will be called and then your application will terminate.

James Huddleston
note that I just went to my .plist file in xcode, double clicked it and then added the property "Application does not run in background" and checked it. I think behind the scenes it's called "uiapplicationexitsonsuspend" so i'll give you the benefit of the doubt. ehehe.
Shnitzel
Good point; the plist editor can show user friendly key names. If you right click on your plist and select "Show Raw Keys/Values" you'll get a peek behind the curtain. :)
James Huddleston