简体   繁体   中英

How to get the position of the touch when in UITableView Drag&Drop

I'm implementing drag&drop in a UITableView, the problem is how to get the position of the touch?
So I can tell the cell is dropped at the area 1,2,3,4 or 5.

在此处输入图片说明

您可以覆盖 touchesBegan(:with:) 并使用 x 和 y 变量来跟踪位置,请参阅此处的文档https://developer.apple.com/documentation/uikit/touches_presses_and_gestures/handling_touches_in_your_view

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM