[英]ApplicationShortcuts, is there any way to not open the app and only execute some actions such as Play/Pause?
I have an audio app and I want to control play/pause with ApplicationShortcutItem
directly, but I don't want to open the app. 我有一个音频应用程序,我想直接用
ApplicationShortcutItem
控制播放/暂停,但是我不想打开该应用程序。 Is it possible? 可能吗?
It is not possible to leave an app in the background when choosing a Home screen quick action. 选择主屏幕快速操作时, 无法将应用程序保留在后台。
From the documentation of UIApplicationShortcutItem
: 从
UIApplicationShortcutItem
的文档中:
When a user chooses one of your Home screen quick actions, the system launches or resumes your app and
UIKit
calls theapplication(_:performActionFor:completionHandler:)
method in your app delegate.当用户选择您的主屏幕快速操作之一时, 系统将启动或恢复您的应用程序,并且
UIKit
在您的应用程序委托中调用application(_:performActionFor:completionHandler:)
方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.