Skip to main content

Overview

A Long Press trigger fires after pressing on an object for a set duration. Long Press can fire once when the duration is hit, continuously while pressing on the view, or once when the press gesture ends.

Trigger Properties

State

Set the trigger to fire when the press begins, while pressing, or when the press ends:
  • Began: Fires once when the user presses the object for the set duration.
  • While Pressing: Fires continuously after the set duration as the user moves their finger.
  • Ended: Fires once when the user stops pressing the object.

Duration

Choose how long the user should hold down their finger before the long press begins firing. The default is 0.5 seconds

Is Enabled

Set if the trigger should fire when the trigger’s conditions are met.

Expression Editor Properties

Location X

trigger.locationX
Horizontal location of your finger in relation to the object the trigger is on.

Location Y

trigger.locationY
Vertical location of your finger in relation to the object the trigger is on.

Minimum Press Duration

trigger.minimumPressDuration
Duration set on the trigger.

Number Of Fingers

trigger.numberOfFingers
Number of fingers set on the trigger.

Is Enabled

trigger.isEnabled
Whether the trigger is enabled or disabled.

Resources

Projects

Expanding Cards Template

I