开发者

What to do when the user hit the home key and the IPhone Application exit

开发者 https://www.devze.com 2023-01-25 03:40 出处:网络
How do i handle the user pressing the home button at any time, while my app is still processing stuff with the server?

How do i handle the user pressing the home button at any time, while my app is still processing stuff with the server?

I have this problem both in ios3 & ios4 - i believe maybe th开发者_Python百科e answers would be different because in ios4 it can last in the background.

how do you usually handle such events? Thanks, Itay


Typically you close all your connections, save your state so that you can renew those connections on restart, and allow your application to close. Apple's guidelines about this are pretty clear.


Check out the Multitasking section of the iOS Application Programming Guide. This tells you how to handle the various types of shutdown/suspension scenarios and how to request more time for specific allowed background operations.

0

精彩评论

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