gpt4 book ai didi

iphone - 手动调用 applicationDidEnterBackground

转载 作者:行者123 更新时间:2023-11-28 19:18:13 25 4
gpt4 key购买 nike

我想将我的应用程序发送到后台,只需单击我的应用程序中的按钮即可。有什么方法可以手动或以任何其他方式调用 applicationdidenterbackground 吗?

最佳答案

iOS Human Interface Guidelines说“不要以编程方式退出”,其中退出必须理解为包括“暂停”:

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.

如果你真的想以编程方式退出你的应用程序,那么你可以调用 exit(0);,但我怀疑你的应用程序是否会通过 Apple 审核。

关于iphone - 手动调用 applicationDidEnterBackground,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10981392/

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