SCLFlicButtonTriggerBehavior

enum SCLFlicButtonTriggerBehavior {}

Represents the different trigger event behaviors that can be configured on the button. The buttonUp and buttonDown events will be active no matter which of these alternatives you choose.

  • Used to distinguish between only click and hold.

    Click will be fired when the button is released if it was pressed for maximum 1 second. Otherwise, hold will be fired 1 second after the button was pressed. Click will then not be fired upon release. Since this option will only distinguish between click and hold it does not have to take double click into consideration. This means that the click event can be sent immediately on button release rather than to wait for a possible double click.

    Note: this will be the default behavior.

    Declaration

    Objective-C

    SCLFlicButtonTriggerBehaviorClickAndHold = 0

    Swift

    case clickAndHold = 0
  • Used to distinguish between only single click and double click.

    Double click will be registered if the time between two button down events was at most 0.5 seconds. The double click event will then be fired upon button release. If the time was more than 0.5 seconds, a single click event will be fired; either directly upon button release if the button was down for more than 0.5 seconds, or after 0.5 seconds if the button was down for less than 0.5 seconds.

    To summarize this, a small delay will be added to the click event (if it was released within 0.5 s) in order to see if a double click will happen next. This ensures that a click event will not be sent prior to the double click.

    Declaration

    Objective-C

    SCLFlicButtonTriggerBehaviorClickAndDoubleClick

    Swift

    case clickAndDoubleClick = 1
  • Used to distinguish between single click, double click and hold.

    If the time between the first button down and button up event was more than 1 second, a hold event will be fired.

    Else, double click will be fired if the time between two button down events was at most 0.5 seconds. The double click event will then be fired upon button release. If the time was more than 0.5 seconds, a single click event will be fired; either directly upon button release if the button was down for more than 0.5 seconds, or after 0.5 seconds if the button was down for less than 0.5 seconds.

    Note: Three fast consecutive clicks means one double click and then one single click. Four fast consecutive clicks means two double clicks.

    Declaration

    Objective-C

    SCLFlicButtonTriggerBehaviorClickAndDoubleClickAndHold

    Swift

    case clickAndDoubleClickAndHold = 2
  • This mode will only send click and the event will be sent directly on buttonDown. This will be the same as listening for buttonDown.

    Declaration

    Objective-C

    SCLFlicButtonTriggerBehaviorClick

    Swift

    case click = 3