views:

50

answers:

2

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
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
it worked just great. Thanks a lot.
Milad
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