开发者

load iPhone background app in the same state as the first time

开发者 https://www.devze.com 2023-01-14 18:03 出处:网络
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 f

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号