开发者

iphone:Multitasking in iphone not possible

Does ip开发者_运维百科hone support multitasking for third party applications.Canone explain me how.


Assuming your device is newer than an iPhone 3G (or 1st gen iPod Touch), then yes, your application may run in the background. Note that even iOS4 doesn't allow multitasking on the older devices. What happens in iOS4 and above is that when you press the home button from an application, it switches the current app to the background - however, it is still running.

When working with games this means you have to use your application delegate to pause your game when the application is sent to the background, and (optionally) resume it when it returns, or present a "pause menu". It should also switch to a low/idle rendering loop (4FPS or similar), however, extra care has to be taken with iPad apps, which do not allow OpenGL rendering in an application that is currently in the background (in my experience). For these cases you have to completely disable the OpenGL render loop. These steps will prevent your application using unnecessary processing power while in the background.

You can see what's currently running in the background by double-tapping the home button on your device. The icons for all the apps will appear in a sliding list at the bottom of the screen. You can press and hold them to bring up the little X's allowing you to terminate the processes.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜