简体   繁体   English

如何在apple watchKit中触发事件?

[英]How to trigger events in apple watchKit?

I wonder how to trigger events programmatically in apple watchKit. 我想知道如何在apple watchKit中以编程方式触发事件。 For example how to fake a touch of a button in watchKit or how to fake a long touch of the whole screen? 例如,如何假装在watchKit中触摸按钮或如何伪造整个屏幕的长触摸? (in swift) (快速)

There is no way to get the selection action from a WKInterfaceButton . 无法从WKInterfaceButton获取选择操作。 You can however, just call the method directly on your InterfaceController. 但是,您可以直接在InterfaceController上调用该方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM