How do I use double tap in watchos

Generated on 7/31/2024

1 search

In watchOS 11, the double tap gesture has been expanded to work in more places within your app. Here are some key points on how to use double tap in watchOS 11:

  1. Automatic Scrolling: Double tap will now automatically scroll through lists, scroll views, and vertical style tap views. Your app will inherit this behavior without additional coding.

  2. Primary Action: You can designate a primary action for the double tap gesture, such as activating a button or toggle in your app, widget, or live activity in the smart stack. To do this, apply the handGestureShortcut modifier to the button or toggle you want to identify as the primary action.

  3. Visual Indication: When a double tap gesture is performed, the system will highlight the outline of the button or toggle to indicate that this is the action being invoked. You can customize the shape of this highlight using the clipShape view modifier.

  4. Consistency and Predictability: Ensure that double tap is used consistently and predictably within your app. If your app already uses lists or scroll views, avoid using double tap to execute actions within those views to prevent conflicts.

  5. On-Screen Controls: Double tap will trigger the primary action only if the control is on screen. If the control is off screen, the system will scroll towards it.

For more detailed information, you can refer to the What’s new in watchOS 11 session.

Relevant Sessions

  1. What’s new in watchOS 11
  2. Platforms State of the Union