ios - WatchKit 检测标签/组上的点击/触摸

标签 ios objective-c watchkit wkinterfacelabel

我有一个嵌套的 WKInterfaceGroupWKInterfaceLabel在这样的范围内:

enter image description here

看起来像这样:

enter image description here

the orange highlight indicates which part of the value the user is currently editing. (Backgroundcolor of WKInterfaceGroup)



我正在尝试找到一种在突出显示的左/右之间切换并遇到问题的方法
  • WatchKit 没有为我提供类似于 touchesBegan 的东西。
  • WKInterfaceLabels 没有操作选择器
  • WKInterfaceGroups 没有操作选择器
  • 没有公开的 ForceTouch API

  • 我的问题是:

    how can i let the user `tap' to select which of the two groups he wants to actively edit?

    最佳答案

    您可以改用 WKInterfaceButton。按钮允许您使用组而不是标签来显示其内容。然后, Hook 到按钮的操作方法。

    关于ios - WatchKit 检测标签/组上的点击/触摸,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29877523/

    相关文章:

    objective-c - 鼠标跟踪守护进程

    swift - 如何从 WatchKit 正确获取心率?

    objective-c - 智能识别电话号码和文本(包括国际号码)

    objective-c - 如何从 UISwitch 中删除目标,以避免因快速点击开关而产生的问题?

    ios - 如何上传和查询颜色以解析 iOS/objective c

    ios - UISearchDisplayController 表格框架

    ios - watchkit 配套应用程序无法启动

    xcode - 在真正的 Apple Watch 和无限微调器上运行应用程序

    ios - 将 findObjectsInBackgroundWithBlock 的结果传递到变量中

    ios - 如何使用 Siri 工具包扩展启用钥匙串(keychain)共享?