Touch Event
Note:
Currently in the beta phase.
Triggered when a finger presses, slides, or lifts on a component.
Import Module
import kit.ArkUI.*
func onTouch(?(TouchEvent) -> Unit)
func onTouch(event: ?(TouchEvent) -> Unit): T
Function: Triggered by finger touch actions.
System Capability: SystemCapability.ArkUI.ArkUI.Full
Since: 22
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| event | ?(TouchEvent) -> Unit | Yes | - | Callback function triggered by finger touch actions. Initial value: { _: TouchEvent => }. |
Return Value:
| Type | Description |
|---|---|
| T | Returns the generic method interface type |