开发者

Sometimes my ipad app resumes to previous state correctly, sometimes it restarts

开发者 https://www.devze.com 2023-03-06 12:47 出处:网络
I developed an ipad application. Some part of the application will bring the user out of the application, to open safari browser.

I developed an ipad application. Some part of the application will bring the user out of the application, to open safari browser.

Supposedly, if the user double click the HOME button to launch the multitasking panel, and select my app again, my app SHOULD RESUME to previous state.

But I 开发者_如何学编程noticed that, my app is currently behaving unpredictably.

Sometimes it is able to resume to previous state. Sometimes it restarts from the very beginning state (even if i juz left the app for less than 1 minute).

How is this behaviour designed?

P/S: Currently I didnt put any single line of code to control this behaviour.


This is expected behavior.

When leaving your app it goes to background, but it may be killed by the system at any time. Also, some older devices don't support backgrounding at all.

You really should save all state when entering background - see the app delegate methods and notifications.

0

精彩评论

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

关注公众号