as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
PressEvent object is returned in the callback as a result of user press interaction, for example onPress in Button component.

Example

Keys and values

changedTouches

Array of all PressEvents that have changed since the last event.

force iOS Vega Not Available

Amount of force used during the 3D Touch press. Returns the float value in range from 0.0 to 1.0.

identifier

Unique numeric identifier assigned to the event.

locationX

Touch origin X coordinate inside touchable area (relative to the element).

locationY

Touch origin Y coordinate inside touchable area (relative to the element).

pageX

Touch origin X coordinate on the screen (relative to the root view).

pageY

Touch origin Y coordinate on the screen (relative to the root view).

target

The node id of the element receiving the PressEvent.

timestamp

Timestamp value when a PressEvent occurred. Value is represented in milliseconds.

touches

Array of all current PressEvents on the screen.

Used by

最后修改于 2026年10月26日