您可以覆盖 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.