In ios4, when you quit your iphone application with the homebutton, it goes to the background. the second time you enter your app (foreground) I wanna be able to load the app like the first time (ViewDidAppear) and not in the state that I left it.
A:
Just find out when the program is backgrounded and end it, then start a new instance when it is unbackgrounded.
David Watson
2010-09-05 20:12:18
A:
In your Info.plist, there's an entry called "Application does not run in background". Check that yes. This isn't a direct answer but it is the most straightforward if you don't actually use that background time to complete tasks.
This should opt you out of running in the background although I haven't tested it. Try it and let us know.
DysonApps
2010-09-05 20:28:49
it worked just great. Thanks a lot.
Milad
2010-09-05 21:48:18
No problem, glad to know it works. I wish Apple would bring this to devs attention or at least mention it in the documentation. I don't believe it's necessary for every app to remember where it was. In fact, there are a lot of apps that would make more logical sense if they start from the same point each time you open them. Choice is good. my 2 cents.
DysonApps
2010-09-06 03:20:47