Contents

Enabling the double-tap gesture on Apple Watch

Customize your app’s response to the double-tap gesture on Apple Watch.

Overview

On Apple Watch Series 9 and Apple Watch Ultra 2, people can trigger a scene’s primary action by tapping their index finger and thumb together twice. In watchOS 11 and later, you can assign a buttonlike control, such as a Button or Toggle as the scene’s primary action, customizing how your app responds to double tap.

Take advantage of system behaviors

Your app receives the default double-tap behaviors automatically. With double tap, people can scroll through lists and scroll views. They can also page through a vertical tab bar. In general, if your scene contains lists, vertical tab views, or scroll views, the system can handle the gesture for your app.

Declare a primary action

If your scene has an obvious main action, you can designate it as the primary action using the handGestureShortcut(_:isEnabled:) modifier and passing the primaryAction as the parameter.

Button ("Start Activity") {
    startActivity = true
}
// Set this button as the primary action for double tap.
.handGestureShortcut(.primaryAction)

When double tap triggers your primary action, the system automatically highlights the affected control. It calculates the shape of the highlighted area based on the control’s content. If you need to customize the highlight, use a clipShape(_:style:) to modify the control’s shape.

You can add the primary action modifier to any buttonlike control, such as buttons, toggles, navigation links, or text fields. You can even add it to widgets and live activities that appear in the Smart Stack, including remote live activities from iOS. However, you can only assign one primary action per scene. If the scene has multiple items that can interact with double tap, such as a primary action inside a scroll view, the system determines the effect based on the following priorities:

  1. Primary action

  2. Scroll view

  3. Vertical tab pagination

The Human Interface Guidelines has additional design guidance.

See Also

Related Documentation

App experience