gpt4 book ai didi

ios - 如何在应用程序中强制 UIApplication DidEnterBackgroundNotification

转载 作者:行者123 更新时间:2023-11-28 23:29:18 30 4
gpt4 key购买 nike

我真的不确定我们是否可以从应用程序发布 UIApplicationDidEnterBackgroundNotification

假设我有一个带有按钮的示例应用程序,当我点击该按钮时,它应该发布 UIApplicationDidEnterBackgroundNotification 通知。

真的可以吗?

最佳答案

 UIApplication.shared.perform(#selector(NSXPCConnection.suspend))

its working but may be its violate apple's guidline.

Quitting your application or sending it to the background programmatically is a violation of the [iOS Human Interface Guidelines][1], which usually doesn't bode well for getting through the review process.

关于ios - 如何在应用程序中强制 UIApplication DidEnterBackgroundNotification,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57353050/

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