Ets 手势问题, PanGesture与PinchGesture 如何监听平移方向与捏合是外扩,还是内缩?
PanGesture如何监听平移方向
PinchGesture 如何能知道捏合是外扩,还是内缩
有没有大佬知道如何操作,api里没有明确说明
鸿蒙
Ets
PanGesture
赞
收藏 0
回答 1
待解决
1、PanGesture中有onActionUpdate方法,可以通过这个方法的参数中获取, 这里的offsetX往左移动为负,offsetY往上移动为负,根据这两个参数的正负可以判断平移方向。
2、同理,PinchGesture有onActionUpdate方法,通过event.scale参数判断外扩和内缩