WKInterfaceTable:轻扫即可编辑股票邮件应用程序
问题描述:
在股票Apple Watch邮件应用程序中,您可以向左滑动以访问电子邮件的更多选项。我将如何去做这个与WKInterfaceTable
?WKInterfaceTable:轻扫即可编辑股票邮件应用程序
答
根据Apple指南,在watchOS中不可能实现自定义手势,如我们在iOS
中所述。因为操作系统本身由watchOS
管理手势。
苹果说什么:
对苹果关注的用户交互生成的触摸事件和手势,但不像iOS应用,您的手表应用不直接处理这些事件。该系统提供了所有的触摸事件和手势自动响应,通过以下方式响应:
• 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关注调用控件的相关操作方法。您可以为界面中的控件定义操作方法,并使用它们来响应用户交互。