gpt4 book ai didi

ios - 如何退出带有 "intentional exception"的 iPhone 应用程序?

转载 作者:行者123 更新时间:2023-11-28 18:14:09 24 4
gpt4 key购买 nike

我知道 Apple 在关闭应用程序时皱眉,因为用户可能认为它崩溃了。

那么,我该如何让它有意退出,并在用户返回主屏幕时出现一个未被捕捉到的异常?另外,这会被 App Store 拒绝吗?

最佳答案

这个答案是我写给另一个问题的。它摘自 Apple 人机界面指南,应该可以帮助您理解为什么不应该以编程方式退出。

您不应该强行关闭应用程序,因为终止应用程序的标准方法是按下主页按钮(或使用多任务栏)

Don’t Quit Programmatically


Never quit an iOS application programmatically because people tend to interpret this as a crash. However, if external circumstances prevent your application from functioning as intended, you need to tell your users about the situation and explain what they can do about it. Depending on how severe the application malfunction is, you have two choices.

Display an attractive screen that describes the problem and suggests a correction. A screen provides feedback that reassures users that there’s nothing wrong with your application. It puts users in control, letting them decide whether they want to take corrective action and continue using your application or press the Home button and open a different application

If only some of your application's features are not working, display either a screen or an alert when people activate the feature. Display the alert only when people try to access the feature that isn’t functioning.

Source

关于ios - 如何退出带有 "intentional exception"的 iPhone 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8153174/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com