从我的应用程序生成远程控制事件 [英] Generating Remote Control Events from my app
本文介绍了从我的应用程序生成远程控制事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对iOS上的远程控制事件有两个问题:
I have two questions regarding Remote Control Events on iOS:
- 我知道音乐应用程序已注册到远程控制事件,然后可以从iPhone的播放器小部件接收此类事件。
假设我希望我的应用触发此类事件,这可能吗? - 例如,耳机如何生成这些事件?
推荐答案
如果没有私有API,则无法将remotecontrol事件发送到您的应用程序。
Without private API, you cannot send remotecontrol event to your application.
原因是我们无法使用以下方式创建这样的事件(UIEvent):
The reason is we cannot create such an Event (UIEvent) to send out by using:
[[UIApplication sharedApplication] sendEvent:anEvent];
您可以保存已注册的事件,然后通过调用上述功能进行回放。
You can, however save a registered event then play back by calling the above-function.
这篇关于从我的应用程序生成远程控制事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文