ios - 检测 Apple Watch 上的手指触摸 Action

标签 ios objective-c swift watchkit ios8.2

我想检测 AppleWatch 上的触摸以获得触摸位置。因为我们可以通过使用以下委托(delegate)方法在 iPhone 应用程序上实现此行为:

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
    //Any Logic
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    //Any Logic
}

所以,我只是在 WatchKit 上使用了这些方法,但没有用; 有什么办法可以实现这种行为?

我想在WatchKit上做一些基于触摸位置的逻辑。

我们将不胜感激任何工作方向。

最佳答案

目前(我不知道 future 是否会发生变化),WatchKit 没有这样的触摸识别器。您只需点击按钮或带有选择器的菜单即可做出响应。

关于ios - 检测 Apple Watch 上的手指触摸 Action ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29538257/

相关文章:

ios - 将 TableView 添加为 subview 不会重新加载数据

objective-c - NSDictionary 中的键可以重复吗?

ios - 一个 View Controller 中的两个警报 View - buttonIndex 响应

ios - 将闭包作为参数传递给单例时的 Swift 内存管理

ios - Swift:Google Place Picker,避免使用 map UI

ios - 发送要在另一个类中修改的变量?

ios - 如何在 OS EL Capitan 10.11.1 中运行 Xcode 5.1.1?

ios - Swift 3 核心数据获取问题

ios - 使用 AVPlayer 播放音频在后台不起作用

ios - 如何在 ios 应用程序中添加 google map direction API?