import CodeBlock from '@theme/CodeBlock';
{
{onBegin: (event: ${props.gesture}HandlerData) => void}
}
Set the callback that is being called when given gesture handler starts receiving touches. At the moment of this callback the handler is not yet in an active state and we don't know yet if it will recognize the gesture at all.
{
{onActivate: (event: ${props.gesture}HandlerData) => void}
}
Set the callback that is being called when the gesture is recognized by the handler and it transitions to the active state.
{
{onDeactivate: (event: ${props.gesture}HandlerData & { canceled: boolean }) => void}
}
Set the callback that is being called when the gesture that was recognized by the handler finishes. It will be called only if the handler was previously in the active state. The event object contains a canceled property — if the gesture was interrupted, canceled is set to true. Otherwise it is set to false.
{
{onFinalize: (event: ${props.gesture}HandlerData & { canceled: boolean }) => void}
}
Set the callback that is being called when the handler finalizes handling gesture - the gesture was recognized and has finished or it failed to recognize. The event object contains a canceled property — if the gesture failed to activate or was interrupted, canceled is set to true. Otherwise it is set to false.
onTouchesDown: (event: GestureTouchEvent) => voidSet the onTouchesDown callback which is called every time a finger is placed on the screen.
onTouchesMove: (event: GestureTouchEvent) => voidSet the onTouchesMove callback which is called every time a finger is moved on the screen.
onTouchesUp: (event: GestureTouchEvent) => voidSet the onTouchesUp callback which is called every time a finger is lifted from the screen.
onTouchesCancel: (event: GestureTouchEvent) => voidSet the onTouchesCancel callback which is called every time a finger stops being tracked, for example when the gesture finishes.