【问题标题】:WKInterfaceTable: Swipe to edit like the stock Mail appWKInterfaceTable:像股票邮件应用一样滑动编辑
【发布时间】:2015-12-27 23:31:57
【问题描述】:

在现有的 Apple Watch 邮件应用程序中,您可以向左滑动以访问更多电子邮件选项。我将如何使用WKInterfaceTable 进行此操作?

【问题讨论】:

    标签: watchkit watchos-2 watchos wkinterfacetable


    【解决方案1】:

    根据 Apple 指南,在 watchOS 中不可能像在 iOS 中那样实现自定义手势。因为watchOS 中的手势由操作系统自己管理。

    苹果怎么说:

    Apple Watch 上的用户交互会生成触摸事件和手势,但与 iOS 应用不同的是,您的 Watch 应用不直接处理这些事件。系统为所有触摸事件和手势提供自动响应,响应方式如下:

    •   Taps trigger action-based events in your app
    •   Vertical swipes scroll the current screen
    •   Horizontal swipes display the previous or next page in a page-based interface
    •   Left edge swipes navigate back to a parent screen in a hierarchical interface
    

    当用户点击一个按钮或另一个控件时,Apple Watch 会调用该控件的关联操作方法。您为界面中的控件定义操作方法并使用它们来响应用户交互。

    More on stackoverflow

    Apple guideline

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-11
      • 1970-01-01
      • 2015-08-01
      • 1970-01-01
      • 2022-10-07
      • 1970-01-01
      • 2012-11-08
      • 2013-07-08
      相关资源
      最近更新 更多