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 b开发者_如何学Goe able to load the app like the first time (ViewDidAppear) and not in the state that I left it.
Just find out when the program is backgrounded and end it, then start a new instance when it is unbackgrounded.
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.
精彩评论