gpt4 book ai didi

ios - 退出钛应用程序(iOS)

转载 作者:可可西里 更新时间:2023-11-01 05:21:29 25 4
gpt4 key购买 nike

iOS 的等价物是什么:

 win.close();
var activity = Titanium.Android.currentActivity;
activity.finish();

谢谢!

最佳答案

没有(在 Titanium 中)。此外,Apple 明确反对这样做:

“iOS 应用程序从不显示关闭或退出选项”- Apple,HIG p27 https://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/MobileHIG.pdf

有关此的现有 SO 答案:

On the iPhone there is no concept of quitting an app. The only action that should cause an app to quit is touching the Home button on the phone, and that's not something developers have access to.

According to Apple, your app should not terminate on its own. Since the user did not hit the Home button, any return to the Home screen gives the user the impression that your app crashed. This is confusing, non-standard behavior and should be avoided.

在此处查看现有的 SO 答案:Proper way to exit iPhone application?

如果,在这一切之后,您想要一个非标准的、可能会被您的应用拒绝的解决方案(或者如果您的应用不是针对应用商店,而是通过企业分发私下分发或个人使用),您可以 create a module调用 [[NSThread mainThread] exit]

关于ios - 退出钛应用程序(iOS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22616698/

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