退出应用程序时点击按钮 - iOS [英] exit application when click button - iOS

查看:216
本文介绍了退出应用程序时点击按钮 - iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

在iOS 4.0中退出应用


AlertView显示一些文本和一个确定按钮。



如果用户按确定按钮,然后应用程序需要退出。



当点击按钮时,有任何方法退出应用程序。

解决方案

exit(X),其中X是数字到doc)应该工作。
但是它不是由苹果推荐,不会被AppStore接受。
为什么?由于这些指南(我的应用程序之一被拒绝):


我们发现您的应用程序包含一个用于退出应用程序的UI控件。
这不符合iOS人机界面指南,因为App Store审查指南要求



请参阅附件屏幕截图/ s参考。



iOS人机界面指南指定



始终准备停止iOS应用程序停止当人们按
主屏幕按钮打开不同的应用程序或使用设备
功能,例如手机。特别是,人们不点击
应用程序关闭按钮或选择退出为了提供良好的
停止体验,iOS应用程序应该:



尽快保存用户数据,尽可能合理,因为
退出或终止通知可以随时到达。



停止时保存当前状态,以最细微的细节
可能,以便人们例如,如果你的应用程序显示滚动数据,
保存当前滚动位置。



<


此外,如果您尝试隐藏该功能,用户会将其理解为崩溃。


Possible Duplicate:
Exit application in iOS 4.0

I have a AlertView which displays some text and a "OK" button.

if user press ok button then app need to exit.

Is there any way to exit application when on click button.

解决方案

exit(X), where X is a number (according to the doc) should work. But it is not recommended by Apple and won't be accepted by the AppStore. Why? Because of these guidelines (one of my app got rejected):

We found that your app includes a UI control for quitting the app. This is not in compliance with the iOS Human Interface Guidelines, as required by the App Store Review Guidelines.

Please refer to the attached screenshot/s for reference.

The iOS Human Interface Guidelines specify,

"Always Be Prepared to Stop iOS applications stop when people press the Home button to open a different application or use a device feature, such as the phone. In particular, people don’t tap an application close button or select Quit from a menu. To provide a good stopping experience, an iOS application should:

Save user data as soon as possible and as often as reasonable because an exit or terminate notification can arrive at any time.

Save the current state when stopping, at the finest level of detail possible so that people don’t lose their context when they start the application again. For example, if your app displays scrolling data, save the current scroll position."

> It would be appropriate to remove any mechanisms for quitting your app.

Plus, if you try to hide that function, it would be understood by the user as a crash.

这篇关于退出应用程序时点击按钮 - iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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