我真的不确定我们是否可以从应用程序发布 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/