Phonegap:强制应用程序退出,而不是在后台运行 [英] Phonegap: force an app to quit instead of running in background

查看:138
本文介绍了Phonegap:强制应用程序退出,而不是在后台运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过Phonegap开发一个iPhone / iPad应用程序,有没有办法实现一种点击这里退出应用程序?

I'm developing an iPhone/iPad application through Phonegap, is there a way to implement a sort of "click here to quit app"? I mean quit for real, not "put it in the background and go to home screen".

提前感谢。

推荐答案

在应用程序的plist中

in the application's plist put

 UIApplicationExitsOnSuspend = TRUE

,当用户点击主页按钮时,应用程序将退出。不需要按钮,无需退出()。

and when the user hits the home button, the application will quit. No need for a button, no need for exit().

http://developer.apple.com/library/ios/#documentation/general/Reference /InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW23

这篇关于Phonegap:强制应用程序退出,而不是在后台运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆