我想在我的应用程序中使用触摸事件。我知道手势识别器不能在 watchKit 中使用。是否可以使用touchesBegan、touchesMove等函数?
Apple Watch 应用程序使用WatchKit 框架。 https://developer.apple.com/library/prerelease/ios/documentation/WatchKit/Reference/WatchKit_framework/index.htmlUIKit 事件在这里不适用。
另一种方法是使用触发的强制触摸事件上下文菜单 https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/Menus.html#//apple_ref/doc/uid/TP40014969-CH15-SW1(如果可供使用的话)
用少量的力按下屏幕会激活与当前界面控制器关联的上下文菜单(如果有),而不是仅仅点击屏幕上的项目。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)